CA Gen CALL EXTERNAL using different web service endpoint URL across multiple environments

Document ID : KB000122156
Last Modified Date : 14/03/2019
Show Technical Document Details
When moving from a Development environment to a QA/test environment or Production environment, it is often required to use a different SOAP Web Service endpoint URL for the CALL EXTERNAL statement. Can this be done without changing the Gen model code and regenerate/rebuild/redeploy the application? 
CA Gen 8.5 & 8.6 "Call External" Action Diagram statement.
1. For C generated code there is a user exit ABRT_xcall_ws_url_exit (file abrtexit.c) that allows the endpoint URL to be dynamically changed at runtime. More details here for Windows & Unix/Linux platforms:
NOTE: To populate a different URL string to the ABRT_xcall_ws_url_exit input/output parameter "*url" (pointer to a character array), the C function strncpy can be used e.g.:
strncpy(url, "new URL string", urlMaxLen);
The corresponding user exit runtime file (IEFABEXN.DLL on Windows and libabex.* on Unix/Linux.) then needs to be rebuilt with supplied make file.

2. For Java generated code user exit (runtime WebServiceMethodCallExit.class) provides similar functionality with more details here:

So using a separate copy of the user exit for each target environment enables that environment to have its own unique version of the runtime dll/shared library/java class to control the URL being used. 
Alternatively a single user exit could be coded with some intelligence to set the URL depending on the value of some variable it can use to determine the target environment being used e.g. an environment variable.
Additional Information:
The thread "Dynamic URI passing for Web services Consumption - F37692" on the CA Gen Community also discusses this topic in more detail: