When using the CA Gen Build Tool Assemble option for a CA Gen Custom EJB Web Service, the "Web Services" tab for Custom EJB Web Service has Host and Port properties plus Endpoint URL options "Router" and "Custom Web Service". Are there any guidelines on what values should be used?
Release : 8.5, 8.6
Component : CA Gen Build Tool
1. The values used in the Host and Port fields need to be valid for the Application Server being used for the deployment.
If no values are entered then the default values from the Gen Studio Web Services Definition properties are used i.e. Host=localhost and Port=8080. NOTE: For Port only an http (unsecure) port can be entered.
When the Custom Web Service executes it calls the Default EJB Web Service to access the EJB and the Host & Port values are also used for that purpose. This is not a security issue because it is just the internal call from the Custom Web Service to the Default EJB Web Service. Also, an Application Server normally allows web service endpoint URL configuration to enable the use of a secure port for the external access to either Custom Web Service or Default EJB Web Service. For example using WebSphere under the "Application" > "Web Services Properties" > "Provide HTTP endpoint URL information":
The Default EJB Web Service (PSTEP1SM.jar) and Custom Web Service (lynnws.war) are both visible because they are assembled together due to the dependency of the Custom Web Service on the Default EJB Web Service.
Using WebSphere the default unsecure port is 9080 so that value should be used for Port which will then override the default value of 8080 from Gen Studio.
That value is then used in the generated wsdl and also in the file soapActionURI.properties (located inside the Custom Web Service war file) which contains the URI/URL to access the Default EJB Web Service.
If an incorrect Port value is used then when testing the Custom Web Service in SoapUi this type of message may be seen:
<faultstring>[java.net.ConnectException: Connection refused: no further information]
Unable to forward message to target EJB. Please see server logs for more information.</faultstring>
2. The 2 options for Endpoint URL, "Router" and "Custom Web Service" provide a different URL format and are documented in the "Web Services" section at the bottom of this page:
CA Gen 8.6 > Developing > Working with Build Tool > Building on Local Host Assemble Application and Database > Assembling Java Applications
Select this option so that the custom web service URL will end with "router". The URL format of the custom web service will be http://host:port/<context_path>/router.
Custom Web Service
Select this option so that the custom web service URL will end with "<custom_web_service_name>". The URL format of the custom web service will be http://host:port/<context_path>/<custom_web_service_name>.
The "Router" option is there purely for historical reasons because that was the URL format used when Custom EJB Web Services were first published through the CA API Gateway.
A subsequent request by users for an improved more standard URL format to avoid having the string "router" in the URL format was implemented but later the original "Router" option was also added back for backward compatibility. These changes came in with Gen 8.5 and 8.6 PTFs and the corresponding problems are:
"CUSTOM WEB SERVICE ACCESS": https://support.broadcom.com/download-center/problem-detail.html?productcd=CGRTI&problemnbr=521
"CUSTOM WEBSERVICES URL HAS CHANGED": https://support.broadcom.com/download-center/problem-detail.html?productcd=CGBT&problemnbr=356
For users who are new to EJB Web Services, using the option "Custom Web Service" is probably optimal to get a more standard URL format and avoid the presence of the "router" string.
Related KB article: URL formats for CA Gen EJB Web Service & Custom Web Service (JBoss EAP & WAS)