'How to deploy services of different version but same EJB name and context-root on Jboss 7.1?

So i am trying to deploy new version of SOAP service with different version. In jboss-webservices.xml I have configured url to service as:

<context-root>/services/MyService</context/root>
<port-component>
    <ejb-name>MyServiceEJB</ejb-name>
    <port-component-uri>v1</port-component-uri>
    ...
</port-component>

When I try to deploy service v2 with <port-component-uri>v2</port-component-uri> it ends up with duplicate deployment error because of same context root.

So I tried it with <context-root>/services/MyService/v2</context-root> and <port-component-uri>/</port-conponent-uri>. This solution actually works. But the wsdl is at location : https://MyServer.com:8443/services/MyService/v2/?wsdl.

Is there any solution to be the wsdl at https://MyServer.com:8443/services/MyService/v2?wsdl ? Without the
"/" before the "?wsdl".

Basically I want to have deployed both versions of application, where both has url https://MyServer.com:8443/services/MyService/v1 and second https://MyServer.com:8443/services/MyService/v2, but without touching the context-root element.

Thanks for any tips.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source