Search in sources :

Example 11 with UseNewBusFeature

use of org.jboss.wsf.stack.cxf.client.UseNewBusFeature in project wildfly by wildfly.

the class ReliableServiceTestCase method consumeHelloService.

private void consumeHelloService() 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());
    Assert.assertEquals("Hello Rosta!", proxy.sayHello("Rosta"));
}
Also used : QName(javax.xml.namespace.QName) UseNewBusFeature(org.jboss.wsf.stack.cxf.client.UseNewBusFeature) ReliableService(org.jboss.as.test.integration.ws.wsrm.generated.ReliableService) ReliableService(org.jboss.as.test.integration.ws.wsrm.generated.ReliableService) Service(javax.xml.ws.Service) BindingProvider(javax.xml.ws.BindingProvider) URL(java.net.URL)

Aggregations

UseNewBusFeature (org.jboss.wsf.stack.cxf.client.UseNewBusFeature)11 URL (java.net.URL)10 QName (javax.xml.namespace.QName)10 Service (javax.xml.ws.Service)10 Test (org.junit.Test)9 ServiceIface (org.jboss.as.test.integration.ws.wsse.ServiceIface)8 BindingProvider (javax.xml.ws.BindingProvider)2 SOAPFaultException (javax.xml.ws.soap.SOAPFaultException)2 ReliableService (org.jboss.as.test.integration.ws.wsrm.generated.ReliableService)2 WebServiceException (javax.xml.ws.WebServiceException)1 Bus (org.apache.cxf.Bus)1 OperateOnDeployment (org.jboss.arquillian.container.test.api.OperateOnDeployment)1 RunAsClient (org.jboss.arquillian.container.test.api.RunAsClient)1 UseThreadBusFeature (org.jboss.wsf.stack.cxf.client.UseThreadBusFeature)1 JBossWSTest (org.jboss.wsf.test.JBossWSTest)1