use of jakarta.xml.ws.Endpoint in project metro-jax-ws by eclipse-ee4j.
the class EndpointEPRTest method testDefaultEPR.
public void testDefaultEPR() throws Exception {
int port = PortAllocator.getFreePort();
String address = "http://localhost:" + port + "/hello";
Endpoint endpoint = Endpoint.create(new RpcLitEndpoint());
endpoint.publish(address);
EndpointReference epr = endpoint.getEndpointReference();
endpoint.stop();
EprUtil.validateEPR(epr, address, null, /*serviceName*/
null, /*portName*/
null, /*portTypeName*/
Boolean.FALSE);
printEPR(epr);
}
use of jakarta.xml.ws.Endpoint in project metro-jax-ws by eclipse-ee4j.
the class EndpointEPRTest method testProviderEndpointW3CEPR.
public void testProviderEndpointW3CEPR() {
int port = PortAllocator.getFreePort();
String address = "http://127.0.0.1:" + port + "/";
Endpoint e = Endpoint.create(HTTPBinding.HTTP_BINDING, new MyProvider());
e.publish(address);
W3CEndpointReference epr = e.getEndpointReference(W3CEndpointReference.class);
e.stop();
printEPR(epr);
EprUtil.validateEPR(epr, address, null, null, null, Boolean.FALSE);
}
use of jakarta.xml.ws.Endpoint in project metro-jax-ws by eclipse-ee4j.
the class EndpointEPRTest method testProviderEndpointW3CEPR_WSDL.
public void testProviderEndpointW3CEPR_WSDL() throws Exception {
int port = PortAllocator.getFreePort();
String address = "http://127.0.0.1:" + port + "/";
Endpoint e = Endpoint.create(HTTPBinding.HTTP_BINDING, new MyProvider());
List<Source> metadata = new ArrayList<Source>();
ClassLoader cl = Thread.currentThread().getContextClassLoader();
String[] docs = { "RpcLitEndpoint.wsdl", "RpcLitAbstract.wsdl", "RpcLitEndpoint.xsd" };
for (String doc : docs) {
URL url = cl.getResource(doc);
metadata.add(new StreamSource(url.openStream(), url.toExternalForm()));
}
e.setMetadata(metadata);
Map<String, Object> endpointProps = new HashMap<String, Object>();
endpointProps.put(Endpoint.WSDL_SERVICE, new QName("http://echo.org/", "RpcLitEndpoint"));
endpointProps.put(Endpoint.WSDL_PORT, new QName("http://echo.org/", "RpcLitPort"));
e.setProperties(endpointProps);
e.publish(address);
W3CEndpointReference epr = e.getEndpointReference(W3CEndpointReference.class);
e.stop();
// EprUtil.validateEPR(epr, address, serviceName, portName, portTypeName, Boolean.TRUE );
EprUtil.validateEPR(epr, address, null, null, null, false);
printEPR(epr);
}
use of jakarta.xml.ws.Endpoint in project metro-jax-ws by eclipse-ee4j.
the class EndpointEPRTest method testProviderEndpointMSCEPR.
public void testProviderEndpointMSCEPR() {
int port = PortAllocator.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 EndpointEPRTest method testDefaultEPRWithWSDL.
public void testDefaultEPRWithWSDL() throws Exception {
int port = PortAllocator.getFreePort();
String address = "http://localhost:" + port + "/hello";
Endpoint endpoint = Endpoint.create(new RpcLitEndpoint());
List<Source> metadata = new ArrayList<Source>();
ClassLoader cl = Thread.currentThread().getContextClassLoader();
String[] docs = { "RpcLitEndpoint.wsdl", "RpcLitAbstract.wsdl", "RpcLitEndpoint.xsd" };
for (String doc : docs) {
URL url = cl.getResource(doc);
metadata.add(new StreamSource(url.openStream(), url.toExternalForm()));
}
endpoint.setMetadata(metadata);
endpoint.publish(address);
EndpointReference epr = endpoint.getEndpointReference();
endpoint.stop();
EprUtil.validateEPR(epr, address, null, /*serviceName*/
null, /*portName*/
null, /* portTypeName */
Boolean.FALSE);
printEPR(epr);
}
Aggregations