how to set the environment variables in CAF


I am working on a CAF project in webmethods version 8.0.
After binding the connector to the fields, I tried to publish it to the MWS and checked the page.
But it threw ACCESS DENIED error.

After a bit of research, I manually changed the web.xml values(wsclient-socketTimeout, wsclient-username, wsclient-password) and it worked. But I think its not a good practice at all.

How can we fix this issue without manually changing anything?
Please reply as it is bit urgent.


Hi Jyoti,

bind these in the designer to variables “${…}”.

You can then set those values in MWS using sysadmin to the correct values after deployment.

Administration Dashboard -> CAF Application Runtime -> -> Environment Settings

You can even modify the endpoint-address here.

See CAF_Development-Guide for further information.


1 Like


There are multiple ways to set values you use for the IS calls

  1. directly on the property bindings

private static final String[][] MYISCALL_PROPERTY_BINDINGS = new String[][] {
{ “#{myISCall.authCredentials.userName}”, “Administrator” },
{ “#{myISCall.authCredentials.password}”, “manage” },
{ “#{myISCall.endpointAddress}”, “http://localhost:5555/soap/rpc” },
{ “#{myISCall.socketTimeout}”, “500000” }, };

  1. in the web.xml as you did

  2. in configuration files

In this case you will need also to have a class that reads the configuration files and saves the values in a Properties object maybe.

  1. As Holger mentioned above.
    However please note that the change you make in this way will require an application restart.

Hope it helps,

1 Like

Yes Turian. We set the variables in web.xml file. I just wanted to know if that is the correct way.

Thank You

Hi Turian/All,

My code has been deployed to UAT IS.
My doubt is:
I have my CAF project in the DEV designer, and the connector is referring to the DEV URL right now.
How to migrate this project to UAT or is there any way to change the end point of the connector to UAT URL so that the UIs work fine in UAT environment.


Hi Jyoti,

when you have assigned the environment variables during design time as described by Vlad, they are pre-populated with the DEV values upon “Build And Upload”.

After Deployment to UAT MWS you have to change these under the SysAdmin User:

Application Dashboard -> CAF Runtime Configuration -> Search
Search for your application in the list (might not be on the first page)

You will find the entries under the Tree-Item Environment Settings.

Change these and apply them to the CAF Application.
Application will reload after that and from now on will use the modified parameters.

This only has to be done on the first deployment but should be checked thoroughly on subsequent deployments.


Hi Holger,

I had set the environment variables in the web.xml file.
As you suggested, I tried first in DEV environment.
What I found is, In Admin Dashboard -> CAF Runtime Conf -> Environment setting, the values are coming from web.xml only.
I changed the web.xml values to some other values and the Admin Dashboard -> CAF Runtime Conf -> Environment setting values are getting changed.
So it does not work.
Could you please check.


Hi Jyoti,

as the web.xml gets deployed together with the application it will be overridden by any subsequent deployment forcing you to do the changes again every time after a deployment.

We prefer the variant to define the variables in designer and assign them to the corresponding bindings.

What happens if you change the values in the CAF runtime config and restart the application?
Are the new values persisted or are they reverted to the values in the web.xml?


Hi Holger,

The values are getting changed to the values mentioned in web.xml file.
Can you please suggest something.


I have deployed everything on to UAT now.
The UIs are working fine and showing the results which is because the connectors are still pointing to the DEV server I guess. Please correct me if I am wrong.
I need to change the URL of the connectors to the STAGE server.