1

My web service module is accessed by multiple customers having different clients and should, therefore, be accessible by different URIs, like

[serverAddress]/MyHTTPRouter/PingService

and

[serverAddress]/MyHTTPRouter/cet/PingService

(replace [serverAddress] with myorg.com or localhost... sorry for that, but StackOverflow limits me currently to two links (even http://localhost counts))

So, I wanted to define 2 servlet-mappings in my web.xml. On StackOverflow, I found the following hints: a) Servlet web.xml servlet-mapping b) How are Servlet url mappings in web.xml used?

I did the following attempts:

Try #1:

<servlet>
    <servlet-name>myorg.PingServiceImpl</servlet-name>
    <servlet-class>com.ibm.ws.websvcs.transport.http.WASAxis2Servlet</servlet-class>
</servlet>
<servlet-mapping>
    <servlet-name>myorg.PingServiceImpl</servlet-name>
    <url-pattern>/cet/PingService</url-pattern>
    <url-pattern>/PingService</url-pattern>
</servlet-mapping>

Test result with SoapUI:

  1. [serverAddress]/MyHTTPRouter/PingService : ok
  2. [serverAddress]/MyHTTPRouter/cet/PingService : Error 404: java.io.FileNotFoundException: WSWS7147E: The system could not locate the endpoint for /cet/PingService.

Try #2:

<servlet>
    <servlet-name>myorg.PingServiceImpl</servlet-name>
    <servlet-class>com.ibm.ws.websvcs.transport.http.WASAxis2Servlet</servlet-class>
</servlet>
<servlet-mapping>
    <servlet-name>myorg.PingServiceImpl</servlet-name>
    <url-pattern>/PingService</url-pattern>
</servlet-mapping>
<servlet-mapping>
    <servlet-name>myorg.PingServiceImpl</servlet-name>
    <url-pattern>/cet/PingService</url-pattern>
</servlet-mapping>

Test result with SoapUI:

  1. [serverAddress]/MyHTTPRouter/PingService : Error 500: javax.servlet.ServletException: com.ibm.ws.websvcs.exception.ConfigurationException: Could not retrieve configuration context in Axis servlet for module: MyHTTPRouter
  2. [serverAddress]/MyHTTPRouter/cet/PingService : same as above (Error 500)

We're talking about an EJB 3.1 application running on IBM Websphere Application Server 8.5. Any ideas why both #1 and #2 are not working and what changes I need to do to access the web service with both /cet/PingService and /PingService ?

Community
  • 1
  • 1

0 Answers0