Gen client calling Gen EJB Web service (WebSphere) makes 4 backend calls
search cancel

Gen client calling Gen EJB Web service (WebSphere) makes 4 backend calls

book

Article ID: 278557

calendar_today

Updated On:

Products

Gen Gen - Run Time Distributed

Issue/Introduction

Testing of a client/server Gen model with EJB Web Service deployed to WebSphere shows the following HTTP calls.
First, enable WebSphere’s setting "NCSA access and HTTP error logging" to generate http_access.log and http_error.log files.
After the Gen client executes the web service call, these 4 backend calls are seen in the http_access.log:

===
127.0.0.1 - - [09/Nov/2023:15:31:15 +1100] "GET /S1/SVR1/?wsdl HTTP/1.1" 404 77
127.0.0.1 - - [09/Nov/2023:15:31:15 +1100] "GET /S1/SVR1?wsdl HTTP/1.1" 302 -
127.0.0.1 - - [09/Nov/2023:15:31:15 +1100] "GET /S1/SVR1/SVR1.wsdl HTTP/1.1" 200 2179
127.0.0.1 - - [09/Nov/2023:15:31:18 +1100] "POST /S1/SVR1 HTTP/1.1" 200 341
===

Where S1 is the server manager and SVR1 is the PStep name of the deployed model.

Any type of Gen client can be used to target the Gen Server EJB Web Service e.g. a Gen Java client using a commcfg.properties file with trancode mapping: *=WS http://hostname:port L

Environment

Gen 8.6 EJB Web Service under WebSphere Application Server.

Resolution

For the 1st call with the 404 error, a new PTF RTJ86309/LU12104 was created. The fix updates the Gen Web services runtime file odc.ws.jar to remove the initial EJB Service wsdl lookup in WebSphere that was causing the 404 error seen in the http_access.log file. So with the fix installed, the remaining group of 3 entries (2 GETs and 1 POST) will still be seen in the WebSphere http_access.log for each web service request:
===
"GET /S1/SVR1?wsdl HTTP/1.1" 302 -
"GET /S1/SVR1/SVR1.wsdl HTTP/1.1" 200 2205
"POST /S1/SVR1 HTTP/1.1" 200 341
===

The 2nd call with the 302 (redirect) is related to the WebSphere wsdl URL syntax being non-standard and cannot be avoided with the current Gen design i.e. it would require another specific contextType to be added for WebSphere to be used in the commcfg.properties WS trancode mapping. The redirect should not significantly impact performance.
See existing KB article: URL formats for Default & Custom Gen EJB Web Service

Additional Information

ALTERNATIVE RESOLUTION:
If using a load balancer, change its configuration to install mappings for the WSDL URLs to redirect to the actual WebSphere WSDL endpoint, which also avoids the above 302 (redirect) e.g. 
"/S1/SVR1/
" := "/S1/SVR1.wsdl"
"/S1/SVR1" := "/S1/SVR1.wsdl"

Enabling caching on the load balancer should also help performance.