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

Document ID : KB000122156
Last Modified Date : 30/11/2018
Show Technical Document Details
Introduction:
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? 
Environment:
CA Gen 8.5 & 8.6 "Call External" Action Diagram statement.
Instructions:
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:
https://docops.ca.com/ca-gen/8-6/en/reference/user-exits/action-block-runtime-user-exits/windows-action-block-runtime-user-exits/abrt_xcall_ws_url_exit-call-external-web-service-url-exit-windows#ABRT_xcall_ws_url_exit-CALLEXTERNALWebServiceURLExit(Windows)-BuildingonWindows 
https://docops.ca.com/ca-gen/8-6/en/reference/user-exits/action-block-runtime-user-exits/unix-and-linux-action-block-runtime-user-exits/abrt_xcall_ws_url_exit-call-external-web-service-url-exit
The corresponding runtime is IEFABEXN.DLL on Windows and libabex.* on Unix/Linux.

2. For Java generated code user exit WebServiceMethodCallExit.java (runtime WebServiceMethodCallExit.class) provides similar functionality with more details here:
https://docops.ca.com/ca-gen/8-6/en/reference/user-exits/action-block-runtime-user-exits/java-action-block-runtime-user-exits/webservicemethodcallexit

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:
https://communities.ca.com/ideas/235726951-dynamic-uri-passing-for-web-services-consumption