blob: c09c2461f33d4b687b3d89c8f483412e2b5985e5 [file] [log] [blame]
package samples.mtomstub;
import java.net.URL;
import javax.xml.ws.Endpoint;
import org.apache.axiom.testutils.PortAllocator;
import junit.framework.TestCase;
import samples.mtomstub.service.DownloadFileImpl;
import samples.mtomstub.stub.DownloadFile;
import samples.mtomstub.stub.DownloadFileServiceLocator;
public class TestDownloadFile extends TestCase {
public void test() throws Exception {
String url = "http://localhost:" + PortAllocator.allocatePort() + "/DownloadFile";
Endpoint endpoint = Endpoint.publish(url, new DownloadFileImpl());
DownloadFile downloadFile = new DownloadFileServiceLocator().getDownloadFilePort(new URL(url));
downloadFile.getFile().getFile().writeTo(System.out);
endpoint.stop();
}
}