]
Alessio Soldano reassigned WFLY-7643:
-------------------------------------
Assignee: Jim Ma (was: Alessio Soldano)
JAX-WS Webservice endpoint naming conflict between different virtual
hosts
--------------------------------------------------------------------------
Key: WFLY-7643
URL:
https://issues.jboss.org/browse/WFLY-7643
Project: WildFly
Issue Type: Bug
Components: Web Services
Affects Versions: 10.1.0.Final, 11.0.0.Alpha1
Reporter: István Tóth
Assignee: Jim Ma
Priority: Major
Attachments: Hello.java, jboss-web.xml, vhost-config-fragment.xml
When deploying identically named POJO JAX-WS webservice endpoints into different
virtualhosts with the same context, the ServiceName generated for the second deployment
conflicts with the first one, and the deployment fails with
org.jboss.msc.service.DuplicateServiceException.
This can be worked around by defining the endpoint as a servlet, and giving globally
distinct <servlet-name> s to them.
I think the cause for the bug is that the ServiceName for the Endpoint is in a server
instance namespace, but the the name is generated from only the endpoint name, and the
context, which is not unique among deployments on different virtual hosts.
Adding the virtual host to the generated name would make the service name unique, and
should also allow routing to it based on virtualhost info by web server.
In the test case the names could be for example
*jboss.ws.endpoint.vhost="hosta".context=."helloservice.endpoint.Hello"*
and
*jboss.ws.endpoint.vhost="hostb".context=."helloservice.endpoint.Hello"*
.