IBM webMethods Hybrid Integration

IBM webMethods Hybrid Integration

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only
  • 1.  Global variables from java service

    Posted Mon February 09, 2015 02:52 PM

    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?


    #webMethods-General
    #Integration-Server-and-ESB
    #webMethods


  • 2.  RE: Global variables from java service

    Posted Mon February 09, 2015 04:37 PM

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

    use:
    com.wm.app.b2b.server.Service.doInvoke
    you can call any WM services from java.


    #webMethods
    #webMethods-General
    #Integration-Server-and-ESB


  • 3.  RE: Global variables from java service

    Posted Tue February 10, 2015 11:10 AM

    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?

    Percio


    #webMethods-General
    #webMethods
    #Integration-Server-and-ESB


  • 4.  RE: Global variables from java service

    Posted Tue February 10, 2015 11:26 AM

    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.


    #Integration-Server-and-ESB
    #webMethods-General
    #webMethods


  • 5.  RE: Global variables from java service

    Posted Tue February 10, 2015 12:21 PM

    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:

    import com.wm.app.b2b.server.globalvariables.GlobalVariablesManager;
    .
    .
    String value = GlobalVariablesManager.getInstance().getGlobalVariableValue(“”).getValue();

    Percio


    #webMethods-General
    #webMethods
    #Integration-Server-and-ESB