Using @WebService annotation it is possible to publish a stateless EJB bean as a web-service. However, is there a way to publish several web-services all having the same implementing class without going through the way of defining its child classes for this purpose?
I.e. it is achievable if we define blank classes A1, A2, A3, A4 all having @WebService annotation and being the descendants of A which actually implements the logic. Then JAX-WS will publish exactly 4 web-services all having different names but practically having the same implementation.
However, what I want is having JAX-WS register several web-services with the same implementation and inside the implementation be able to get the name of the web-service through which this implementation is invoked.
EDIT: Currently trying to achieve the result by using JAX-WS Endpoint class (runtime publisher).