Esempio n. 1
0
  @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());
  }
Esempio n. 2
0
  @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());
  }
Esempio n. 3
0
 private void configureObject(Object instance) {
   Configurer configurer = bus.getExtension(Configurer.class);
   if (null != configurer) {
     configurer.configureBean(instance);
   }
 }