I think you can do something like this:
sf = new JaxWsServerFactoryBean();
sf.setEndpointName(new QName("myport");
sf.setServiceClass(MyServiceInterface.class); // could use impl here too
I think
sf.getServiceFactory().setInvoker(new JAXWSMethodInvoker(myServiceImpl);
Server server = sf.create();
rinse and repeat for all the endpoints you want.
Normally what happens is the ServerFactoryBean gets the endpoint name
(we use wsdl 2 terminology here) from the ServiceFactory, which in turn
reads the annotations. But setEndpointName() overrides this.
- Dan
Soltysik, Seumas wrote:
>Hi,
>Is it possible to deploy multiple endpoints using the same implementation class? In other
words if you have a service which defines two ports, how would you activate/deploy both ports/endpoints
using the same generated Java impl. I don't see any test cases that test this scenario. Furthermore
it appears that the code relies upon the portname being included as part of an annotation.
If so, this means that a single java impl probably could not be used for two separate endpoints.
>Regards,
>Seumas
>
>
>
--
Dan Diephouse
(616) 971-2053
Envoi Solutions LLC
http://netzooid.com
|