use of jakarta.xml.ws.Service in project metro-jax-ws by eclipse-ee4j.
the class ClientEprTest method testEprWithDispatchWithoutWSDL.
public void testEprWithDispatchWithoutWSDL() throws Exception {
Service service = Service.create(serviceName);
service.addPort(portName, jakarta.xml.ws.soap.SOAPBinding.SOAP11HTTP_BINDING, endpointAddress);
Dispatch dispatch = service.createDispatch(portName, Source.class, Service.Mode.PAYLOAD);
w3cEprGettertest(dispatch, false);
msEprGettertest(dispatch, false);
}
use of jakarta.xml.ws.Service in project metro-jax-ws by eclipse-ee4j.
the class EprExtensionsContributorTest method testEprWithDispatchWithWSDL.
/**
* Tests client-side access to EPR extensions specified in WSDL
*
* @throws Exception
*/
public void testEprWithDispatchWithWSDL() throws Exception {
Service service = new HelloService();
Dispatch dispatch = service.createDispatch(portName, Source.class, Service.Mode.PAYLOAD);
WSEndpointReference wsepr = ((WSBindingProvider) dispatch).getWSEndpointReference();
assertTrue(wsepr.getEPRExtensions().size() == 1);
WSEndpointReference.EPRExtension idExtn = wsepr.getEPRExtension(new QName("http://example.com/addressingidentity", "Identity"));
assertTrue(idExtn != null && idExtn.getQName().equals(new QName("http://example.com/addressingidentity", "Identity")));
}
use of jakarta.xml.ws.Service in project metro-jax-ws by eclipse-ee4j.
the class ServiceTest method test.
public void test() throws Exception {
Service service = Service.create(new QName("", ""));
Iterator<QName> ports = service.getPorts();
assertFalse(ports.hasNext());
QName newPort = new QName("urn:test", "newPort");
service.addPort(newPort, SOAPBinding.SOAP11HTTP_BINDING, "http://localhost/service");
ports = service.getPorts();
assertEquals(newPort, ports.next());
}
use of jakarta.xml.ws.Service in project metro-jax-ws by eclipse-ee4j.
the class DispatchClient method createDispatchSource.
Dispatch<Source> createDispatchSource() {
QName serviceName = new QName("test", "test");
QName portName = new QName("test", "test");
Service s = Service.create(serviceName);
s.addPort(portName, HTTPBinding.HTTP_BINDING, endpointAddress);
Dispatch<Source> d = s.createDispatch(portName, Source.class, Service.Mode.PAYLOAD);
setHandlerChain(d);
return d;
}
use of jakarta.xml.ws.Service in project metro-jax-ws by eclipse-ee4j.
the class DispatchClient method createDispatchDataSource.
Dispatch<DataSource> createDispatchDataSource() {
QName serviceName = new QName("test", "test");
QName portName = new QName("test", "test");
Service s = Service.create(serviceName);
s.addPort(portName, HTTPBinding.HTTP_BINDING, endpointAddress);
Dispatch<DataSource> d = s.createDispatch(portName, DataSource.class, Service.Mode.MESSAGE);
setHandlerChain(d);
return d;
}
Aggregations