Search in sources :

Example 1 with ServiceContractResolverRegistryImpl

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);
}
Also used : ServiceContractResolverRegistryImpl(org.apache.cxf.bus.managers.ServiceContractResolverRegistryImpl) Greeter(org.apache.hello_world_soap_http.Greeter) ServiceContractResolverRegistry(org.apache.cxf.endpoint.ServiceContractResolverRegistry) Service(javax.xml.ws.Service) URL(java.net.URL) Test(org.junit.Test)

Aggregations

URL (java.net.URL)1 Service (javax.xml.ws.Service)1 ServiceContractResolverRegistryImpl (org.apache.cxf.bus.managers.ServiceContractResolverRegistryImpl)1 ServiceContractResolverRegistry (org.apache.cxf.endpoint.ServiceContractResolverRegistry)1 Greeter (org.apache.hello_world_soap_http.Greeter)1 Test (org.junit.Test)1