@Test public void testClientProxyFactory() { JaxWsProxyFactoryBean cf = new JaxWsProxyFactoryBean(); cf.setAddress("http://localhost:" + PORT + "/test"); cf.setServiceClass(Greeter.class); cf.setBus(getBus()); Configurer c = getBus().getExtension(Configurer.class); c.configureBean("client.proxyFactory", cf); Greeter greeter = (Greeter) cf.create(); Client client = ClientProxy.getClient(greeter); checkAddressInterceptors(client.getInInterceptors()); }
@Test public void testServerFactory() { JaxWsServerFactoryBean sf = new JaxWsServerFactoryBean(); assert bus != null; sf.setServiceBean(new GreeterImpl()); sf.setAddress("http://localhost:" + PORT + "/test"); sf.setStart(false); Configurer c = getBus().getExtension(Configurer.class); c.configureBean("server", sf); Server server = sf.create(); Endpoint endpoint = server.getEndpoint(); checkAddressInterceptors(endpoint.getInInterceptors()); }
private void configureObject(Object instance) { Configurer configurer = bus.getExtension(Configurer.class); if (null != configurer) { configurer.configureBean(instance); } }