use of javax.xml.ws.Service in project wildfly by wildfly.
the class TestRequiredAddressingTestCase method usingWSDLFromDeployedEndpoint.
@Test
public void usingWSDLFromDeployedEndpoint() throws Exception {
QName serviceName = new QName("http://www.jboss.org/jbossws/ws-extensions/wsaddressing", "AddressingService");
URL wsdlURL = new URL(baseUrl, "/jaxws-wsa/AddressingService?wsdl");
File wsdlFile = new File(this.getClass().getSimpleName() + ".wsdl");
TestNoAddressingTestCase.downloadWSDLToFile(wsdlURL, wsdlFile);
Service service = Service.create(wsdlFile.toURI().toURL(), serviceName);
ServiceIface proxy = (ServiceIface) service.getPort(ServiceIface.class);
Assert.assertEquals(expectedResponse, proxy.sayHello(message));
wsdlFile.delete();
}
use of javax.xml.ws.Service in project wildfly by wildfly.
the class ReliableServiceTestCase method consumeOneWayService.
private void consumeOneWayService() throws Exception {
QName serviceName = new QName("http://www.jboss.org/jbossws/ws-extensions/wsrm", "ReliableService");
URL wsdlURL = new URL(baseUrl, "ReliableService?wsdl");
Service service = Service.create(wsdlURL, serviceName, new UseNewBusFeature());
ReliableService proxy = (ReliableService) service.getPort(ReliableService.class);
BindingProvider bp = (BindingProvider) proxy;
bp.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, new URL(baseUrl, "ReliableService").toString());
proxy.writeLogMessage();
}
use of javax.xml.ws.Service in project wildfly by wildfly.
the class InjectionTestCase method testPojoEndpoint.
@Test
public void testPojoEndpoint() throws Exception {
QName serviceName = new QName("http://jbossws.org/injection", "POJOService");
URL wsdlURL = new URL(baseUrl, "/jaxws-injection-pojo/POJOService?wsdl");
Service service = Service.create(wsdlURL, serviceName);
EndpointIface proxy = service.getPort(EndpointIface.class);
Assert.assertEquals("Hello World!:Inbound:TestHandler:POJOBean:Outbound:TestHandler", proxy.echo("Hello World!"));
}
use of javax.xml.ws.Service in project wildfly by wildfly.
the class SimpleWebserviceEndpointTestCase method testSimpleStatelessWebserviceEndpoint.
@Test
public void testSimpleStatelessWebserviceEndpoint() throws Exception {
final QName serviceName = new QName("org.jboss.as.test.integration.ws", "SimpleService");
final URL wsdlURL = new URL(baseUrl, "/ws-endpoint-example/SimpleService?wsdl");
final Service service = Service.create(wsdlURL, serviceName);
final SimpleWebserviceEndpointIface port = service.getPort(SimpleWebserviceEndpointIface.class);
final String result = port.echo("hello");
Assert.assertEquals("hello", result);
}
use of javax.xml.ws.Service in project wildfly by wildfly.
the class Usecase1TestCase method testDeclaredEndpoint.
@Test
public void testDeclaredEndpoint() throws Exception {
final QName serviceName = new QName("org.jboss.as.test.integration.ws.anonymousPojos", "POJOImplService");
final URL wsdlURL = new URL(baseUrl, "/anonymous-pojo-usecase1/POJOService?wsdl");
final Service service = Service.create(wsdlURL, serviceName);
final POJOIface port = service.getPort(POJOIface.class);
final String result = port.echo("hello");
Assert.assertEquals("hello from POJO", result);
}
Aggregations