use of jakarta.xml.ws.Endpoint in project metro-jax-ws by eclipse-ee4j.
the class EndpointEPRTester method testProviderEndpointMSCEPR.
public void testProviderEndpointMSCEPR() {
int port = Util.getFreePort();
String address = "http://127.0.0.1:" + port + "/";
Endpoint e = Endpoint.create(HTTPBinding.HTTP_BINDING, new MyProvider());
e.publish(address);
MemberSubmissionEndpointReference epr = e.getEndpointReference(MemberSubmissionEndpointReference.class);
e.stop();
EprUtil.validateEPR(epr, address, null, null, null, Boolean.FALSE);
printEPR(epr);
}
use of jakarta.xml.ws.Endpoint in project metro-jax-ws by eclipse-ee4j.
the class EndpointWsdlLocationTester method testHtmlPage.
public void testHtmlPage() throws Exception {
int port = Util.getFreePort();
String address = "http://localhost:" + port + "/hello";
Endpoint endpoint = Endpoint.create(new RpcLitEndpointWsdlLocation());
endpoint.publish(address);
URL pubUrl = new URL(address);
URLConnection con = pubUrl.openConnection();
InputStream is = con.getInputStream();
int ch;
while ((ch = is.read()) != -1) ;
assertTrue(con.getContentType().contains("text/html"));
endpoint.stop();
}
use of jakarta.xml.ws.Endpoint in project metro-jax-ws by eclipse-ee4j.
the class EndpointWsdlLocationTester method testWsdlLocation1.
// The published WSDL is wrong as we are not setting metadata
public void testWsdlLocation1() throws Exception {
int port = Util.getFreePort();
String address = "http://localhost:" + port + "/hello";
Endpoint endpoint = Endpoint.create(new RpcLitEndpointWsdlLocation());
endpoint.publish(address);
URL pubUrl = new URL(address + "?wsdl");
boolean gen = isGenerated(pubUrl.openStream());
assertFalse(gen);
invoke(address);
endpoint.stop();
}
use of jakarta.xml.ws.Endpoint in project metro-jax-ws by eclipse-ee4j.
the class EndpointStopper method deploy.
static Endpoint deploy() throws Exception {
List<Source> metadata = new ArrayList<Source>();
metadata.add(new StreamSource(Deploy3.class.getResourceAsStream("/WEB-INF/wsdl/EchoInnerService_schema1.xsd"), "file://WEB-INF/wsdl/EchoInnerService_schema1.xsd"));
metadata.add(new StreamSource(Deploy3.class.getResourceAsStream("/WEB-INF/wsdl/EchoInnerService.wsdl"), "file://WEB-INF/wsdl/EchoInnerService.wsdl"));
// properties = {
// }
Map properties = new HashMap();
// testEndpoint.className = fromjava.innerclass.EchoImpl.EchoInner
Object endpointImpl = fromjava.innerclass.EchoImpl.EchoInner.class.newInstance();
Endpoint endpoint = Endpoint.create(endpointImpl);
endpoint.setMetadata(metadata);
endpoint.setProperties(properties);
String address = "http://localhost:" + DEPLOY_PORT + "/fromjava.innerclass/EchoImpl.EchoInner";
System.out.println("Deploying endpoint to [" + address + "]");
endpoint.publish(address);
return endpoint;
}
use of jakarta.xml.ws.Endpoint in project metro-jax-ws by eclipse-ee4j.
the class DynamicPublishTest method testDeployFail.
// Publish a webservice when data-binding files are generated dynamically.
public void testDeployFail() throws Exception {
Endpoint endpoint = Endpoint.create(new GenericWithEnums());
endpoint.publish("http://localhost:" + PortAllocator.getFreePort() + "/GenericWithEnumsservice.org/GenericWithEnums");
endpoint.stop();
}
Aggregations