Currently, I created a project webservice which I provide 2 webservices endpoint corresponding with 2 versions is MyWebserviceV1 and MyWebserviceV2.
However, I would like to have only one access url and I will forward the request base on targetNamspace.
URL example: localhost:8080/my-project/MyWebservice
I have 2 files wsdl for these versions, each file wsdl I have different targetNamespace:
- MyWebserviceV1: the targetNamespace com.test/myservice-v1.0
- MyWebserviceV2: the targetNamespace com.test/myservice-v2.0
My idea is that: When I receive the SOAP request, base on the targetNamespace (QName from client request) attribute, I will forward to corresponding endpoint.
I intended to use the javax.servlet.Filter for pre-process request but I could not get the target targetNamspace.
How can I get the targetNamespace from SOAP request message, or any configuration available to use for my case.