Search in sources :

Example 26 with Service

use of javax.xml.ws.Service in project wildfly by wildfly.

the class EJBEndpointTestCase method endpointLookup.

@Before
public void endpointLookup() throws Exception {
    QName serviceName = new QName("http://jbossws.org/basic", "EJB3Service");
    URL wsdlURL = new URL(baseUrl, "/jaxws-basic-ejb3/EJB3Service?wsdl");
    Service service = Service.create(wsdlURL, serviceName);
    proxy = service.getPort(EndpointIface.class);
}
Also used : QName(javax.xml.namespace.QName) Service(javax.xml.ws.Service) URL(java.net.URL) Before(org.junit.Before)

Example 27 with Service

use of javax.xml.ws.Service in project wildfly by wildfly.

the class ContextHandlerEndpointTestCase method testHandlerContext.

@Test
public void testHandlerContext() throws Exception {
    QName serviceName = new QName("org.jboss.as.test.integration.ws.ejb", "ContextHandlerService");
    URL wsdlURL = new URL(baseUrl, "/context-handler-endpoint/ContextHandlerService/ContextHandlerEndpointImpl?wsdl");
    Service service = Service.create(wsdlURL, serviceName);
    ContextHandlerEndpointIface port = service.getPort(ContextHandlerEndpointIface.class);
    String response = port.doSomething("hello");
    Assert.assertNotNull("Response is null.", response);
}
Also used : QName(javax.xml.namespace.QName) Service(javax.xml.ws.Service) URL(java.net.URL) Test(org.junit.Test)

Example 28 with Service

use of javax.xml.ws.Service in project wildfly by wildfly.

the class AS1675TestCase method testEjb3EndpointInjection.

@Test
public void testEjb3EndpointInjection() throws Exception {
    QName serviceName = new QName("http://jbossws.org/as1675", "EJB3Service");
    URL wsdlURL = new URL(baseUrl + "/as1675/EJB3Service?wsdl");
    Service service = Service.create(wsdlURL, serviceName);
    EndpointIface proxy = (EndpointIface) service.getPort(EndpointIface.class);
    Assert.assertEquals("Hello World!:EJB3Bean", proxy.echo("Hello World!"));
}
Also used : QName(javax.xml.namespace.QName) Service(javax.xml.ws.Service) URL(java.net.URL) Test(org.junit.Test)

Example 29 with Service

use of javax.xml.ws.Service in project wildfly by wildfly.

the class EjbEndpointInsideWarTestCase method testEjb3InsideWarEndpoint.

@Test
public void testEjb3InsideWarEndpoint() throws Exception {
    QName serviceName = new QName("http://jbossws.org/injection", "EJB3Service");
    URL wsdlURL = new URL(baseUrl, "/jaxws-injection-ejb3/EJB3Service?wsdl");
    Service service = Service.create(wsdlURL, serviceName);
    EndpointIface proxy = service.getPort(EndpointIface.class);
    Assert.assertEquals("Hello World!:Inbound:TestHandler:EJB3Bean:Outbound:TestHandler", proxy.echo("Hello World!"));
}
Also used : QName(javax.xml.namespace.QName) Service(javax.xml.ws.Service) EndpointIface(org.jboss.as.test.integration.ws.injection.ejb.basic.webservice.EndpointIface) URL(java.net.URL) Test(org.junit.Test)

Example 30 with Service

use of javax.xml.ws.Service in project wildfly by wildfly.

the class InjectionTestCase method testEjb3Endpoint.

@Test
public void testEjb3Endpoint() throws Exception {
    QName serviceName = new QName("http://jbossws.org/injection", "EJB3Service");
    URL wsdlURL = new URL(baseUrl, "/jaxws-injection-ejb3/EJB3Service?wsdl");
    Service service = Service.create(wsdlURL, serviceName);
    EndpointIface proxy = service.getPort(EndpointIface.class);
    Assert.assertEquals("Hello World!:Inbound:TestHandler:EJB3Bean:Outbound:TestHandler", proxy.echo("Hello World!"));
}
Also used : QName(javax.xml.namespace.QName) Service(javax.xml.ws.Service) EndpointIface(org.jboss.as.test.integration.ws.injection.ejb.basic.webservice.EndpointIface) URL(java.net.URL) Test(org.junit.Test)

Aggregations

Service (javax.xml.ws.Service)138 URL (java.net.URL)125 QName (javax.xml.namespace.QName)91 Test (org.junit.Test)84 BindingProvider (javax.xml.ws.BindingProvider)39 WebServiceException (javax.xml.ws.WebServiceException)18 IOException (java.io.IOException)12 Bus (org.apache.cxf.Bus)12 OperateOnDeployment (org.jboss.arquillian.container.test.api.OperateOnDeployment)11 InsuranceService (com.salaboy.jbpm5.dev.guide.webservice.InsuranceService)10 HashMap (java.util.HashMap)10 ServiceIface (org.jboss.as.test.integration.ws.wsse.ServiceIface)10 UseNewBusFeature (org.jboss.wsf.stack.cxf.client.UseNewBusFeature)10 MalformedURLException (java.net.MalformedURLException)9 RunAsClient (org.jboss.arquillian.container.test.api.RunAsClient)9 WrapThreadContextClassLoader (org.jboss.as.test.integration.ws.WrapThreadContextClassLoader)9 File (java.io.File)8 WSS4JOutInterceptor (org.apache.cxf.ws.security.wss4j.WSS4JOutInterceptor)8 SAAJOutInterceptor (org.apache.cxf.binding.soap.saaj.SAAJOutInterceptor)7 Client (org.apache.cxf.endpoint.Client)7