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"));
}
Aggregations