Currently I am implementing Axis2 inside my project (ROOT.war, http://localhost:8080/), but we need to use the next url to call our web service "http://localhost:8080/axis2/services/MyService", so I implemented this set up on web.xml:
<servlet-mapping>
<servlet-name>AxisServlet</servlet-name>
<url-pattern>/axis2/services/*</url-pattern>
</servlet-mapping>
But when we check the generated wsdl(http://localhost:8080/axis2/services/MyService?wsdl) there is a part(location value) which is still pointing to http://localhost:8080/services/ instead of http://localhost:8080/axis2/services/
<wsdl:service name="MyService">
<wsdl:port name="MyServiceHttpSoap11Endpoint" binding="tns:MyServiceSoap11Binding">
<soap:address location="http://localhost:8080/services/MyService.MyServiceHttpSoap11Endpoint/"/>
</wsdl:port>
<wsdl:port name="MyServiceHttpSoap12Endpoint" binding="tns:MyServiceSoap12Binding">
<soap12:address location="http://localhost:8080/services/MyService.MyServiceHttpSoap12Endpoint/"/>
</wsdl:port>
<wsdl:port name="MyServiceHttpEndpoint" binding="tns:MyServiceHttpBinding">
<http:address location="http://localhost:8080/services/MyService.MyServiceHttpEndpoint/"/>
</wsdl:port>
</wsdl:service>
So when I tried to test my WS using SOAP UI is throws an error since I am trying to test with http://localhost:8080/axis2/services/MyService but is set up with http://localhost:8080/services/MyService
This is my services.xml
<service name="MyService" >
<Description>
MyService Web Service
</Description>
<messageReceivers>
<messageReceiver mep="http://www.w3.org/ns/wsdl/in-only" class="org.apache.axis2.rpc.receivers.RPCInOnlyMessageReceiver" />
<messageReceiver mep="http://www.w3.org/ns/wsdl/in-out" class="org.apache.axis2.rpc.receivers.RPCMessageReceiver"/>
</messageReceivers>
<parameter name="ServiceClass" locked="false">com.xxx.yyy.ws.webservice.MyService</parameter>
</service>
Is there a way to set up something on services.xml to change the url? or any other way to avoid this mismatch?