use of jakarta.xml.ws.Endpoint in project metro-jax-ws by eclipse-ee4j.
the class OnewayTester method testOneway.
public void testOneway() throws Exception {
int port = Util.getFreePort();
String address = "http://localhost:" + port + "/oneway";
Endpoint endpoint = Endpoint.create(new OnewayEndpoint());
endpoint.publish(address);
int status = getHttpStatus(address);
assertEquals(202, status);
assertTrue(verify(address).contains("12345"));
endpoint.stop();
}
use of jakarta.xml.ws.Endpoint in project metro-jax-ws by eclipse-ee4j.
the class JaxwsHttpServer method createEndpoint.
private void createEndpoint(Adapter adapter, File warDirFile) throws Exception {
/*
String url = "http://localhost:8080/"+warDir+endpointInfo.getUrlPattern();
EndpointFactory.newInstance ().publish (url, endpointInfo.getImplementor());
*/
String urlPattern = adapter.urlPattern;
if (urlPattern.endsWith("/*")) {
urlPattern = urlPattern.substring(0, urlPattern.length() - 2);
}
String warDirName = warDirFile.getName();
String contextRoot = "/" + warDirName + urlPattern;
System.out.println("Context Root=" + contextRoot);
HttpContext context = appServer.createContext(contextRoot);
// Creating endpoint from backdoor (and this publishes it, too)
Endpoint endpoint = new EndpointImpl(adapter.getEndpoint(), context);
// // set MTOM
// if (binding instanceof SOAPBinding) {
// ((SOAPBinding)endpoint.getBinding()).setMTOMEnabled(((SOAPBinding)binding).isMTOMEnabled());
// ((SOAPBinding)endpoint.getBinding()).setRoles(((SOAPBinding)binding).getRoles());
// }
}
use of jakarta.xml.ws.Endpoint in project metro-jax-ws by eclipse-ee4j.
the class DocBareTest method testBare.
public void testBare() throws Exception {
int port = PortAllocator.getFreePort();
String address = "http://localhost:" + port + "/bare";
Endpoint endpoint = Endpoint.create(new BareService());
endpoint.publish(address);
endpoint.stop();
}
use of jakarta.xml.ws.Endpoint in project metro-jax-ws by eclipse-ee4j.
the class EndpointAPITest method testHttpsAddress.
public void testHttpsAddress() {
int port = PortAllocator.getFreePort();
String address = "https://localhost:" + port + "/hello";
// Doesn't support https scheme, so expect IllegalArgumentException
try {
Endpoint endpoint = Endpoint.publish(address, new RpcLitEndpoint());
assertTrue(false);
} catch (IllegalArgumentException e) {
}
}
use of jakarta.xml.ws.Endpoint in project metro-jax-ws by eclipse-ee4j.
the class EndpointAPITest method testEndpoint.
public void testEndpoint() {
int port = PortAllocator.getFreePort();
String address = "http://localhost:" + port + "/hello";
Endpoint endpoint = Endpoint.publish(address, new RpcLitEndpoint());
doAPItesting(endpoint);
}
Aggregations