use of org.apache.cxf.bus.managers.ServiceContractResolverRegistryImpl in project cxf by apache.
the class JarResolverTest method testResolver.
@Test
public void testResolver() throws Exception {
URL wsdl = getClass().getResource("/wsdl/hello_world.wsdl");
assertNotNull(wsdl);
createBus();
assertNotNull(bus);
ServiceContractResolverRegistryImpl registry = new ServiceContractResolverRegistryImpl();
registry.setBus(bus);
assertNotNull(bus.getExtension(ServiceContractResolverRegistry.class));
JarServiceContractResolver resolver = new JarServiceContractResolver();
registry.register(resolver);
Service service = Service.create(serviceName);
// service.addPort(portName, SOAPBinding.SOAP11HTTP_BINDING,
// "http://localhost:9000/SoapContext/SoapPort");
Greeter greeter = service.getPort(portName, Greeter.class);
updateAddressPort(greeter, PORT);
String resp = greeter.sayHi();
assertNotNull(resp);
}
Aggregations