Global variables from java service

I have created couple of global variables in IS Admin (Settings–> global variables) to use it across all the services.

How can I read the global variables from a java service?

1 Like

check: _documentation\webMethods\Integration_Server\9-7_Integration_Server_Java_API_Reference

you can call any WM services from java.

The global variables depend on the variable substitution feature of Flow services. Must you really read the variable from a Java service? May I recommend that you create an input variable in your Java service and then use variable substitution on that input when calling the Java service instead?


Thanks for your replies.

I already have the wrapper service created for the java service. I am currently using the flow service to read the global variables and passing these as input parameters to the java service.

I am trying to find a way to avoid this and get the global variables read from the java service itself.

There’s no public API to read the global variables. Therefore, in my personal opinion, your wrapper solution is the proper way to do it. Nevertheless, if you must read the global variable from the Java service itself, you can try something like:

String value = GlobalVariablesManager.getInstance().getGlobalVariableValue("").getValue();