Hi everybody,

I've implemented a webservice that acts as some kind of dispatcher, forwarding 
the received SOAP message body content to some legacy services.
What I'd like to do is to create multiple instances of that service and make 
those accessible under an own address each. My idea was to pass the name of the 
legacy service as a parameter to the service instance at creation time so that 
it can use the service name to dispatch the messages to the correct service.
What I tried to do is:

...
JaxWsServerFactoryBean srvBean = new JaxWsServerFactoryBean();
srvBean.setBus(getBus());
srvBean.setAddress("/legacyService1");
srvBean.setServiceBean(new SoapDispatcherServiceImpl("legacyService1"));
srvBean.create();

srvBean.setAddress("/legacyService2");
srvBean.setServiceBean(new SoapDispatcherServiceImpl("legacyService2"));
srvBean.create();

srvBean.setAddress("/legacyService3");
srvBean.setServiceBean(new SoapDispatcherServiceImpl("legacyService3"));
srvBean.create();
...

But this doesn't work the way I want it. The different addresses are 
accessible, but it looks like it's always the same service instance that 
processes the messages.

Am I doing something wrong? And is what I want to do generally possible?


Mit freundlichen Grüßen / With kind regards,
Julien Charon

Avitech GmbH
Engineering AxL
Tel.: +49 (0)7541/282-177
Fax: +49 (0)7541/282-199
e-mail: [email protected]<mailto:[email protected]>
________________________________________________
Avitech GmbH
Principal Office: Bahnhofplatz 1 | 88045 Friedrichshafen | Germany
Court Registration: Amtsgericht Ulm | HRB 728293
Geschäftsführer/Managing Director: Antonio Maria Gonzalez Gorostiza
http://avitech.aero<http://avitech.aero/>

This message may contain confidential information and is intended only for the 
individual named. If you are not the named addressee you should not 
disseminate, distribute or copy this e-mail. Please notify the sender 
immediately by e-mail if you have received this e-mail by mistake and delete 
this e-mail from your system.

Reply via email to