I want to create a SOAP service with multiple port types exposed, where each port type has a separate interface. I'm trying to do this using JAX-WS 2.0.
Example:
interface A:
ObjectA get(String name);
interface B:
ObjectB get(String name);
Service:
port A
get
port B
get
The problem I'm having is that an @WebService is defined using a single class/interface, so the only way I'm able to set this up is having two separate services. Each service implemented by a separate class with a @WebService annotation.
I'd like to expose both ports using the same service, to make it clear that both of them are part of the same API. Is this possible?
Really, what I'm after is having some kind of nested namespace support in the WSDL, so I can have the same methods in different namespaces. I'll have get/set/delete methods for different kinds of data next to each other, but I'd rather not put them all in the same big interface with getA/getB and so on, since I'd like to be able to add new data types later on without forcing all the clients to regenerate from the new set of WSDLs. Any tips on achieving this are welcome, even if it means using another way of generating the WSDL from java code.