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.


#TechXchangePresenter
 View Only
Expand all | Collapse all

How to access to implicit/environment variables from code

  • 1.  How to access to implicit/environment variables from code

    Posted Mon October 17, 2011 01:15 PM

    Hello Guys:

    I need to know how to get some environment variables such as wsclient-endpointAddress

    regards.


    #webMethods-BPMS
    #webMethods
    #MWS-CAF-Task-Engine


  • 2.  RE: How to access to implicit/environment variables from code

    Posted Mon October 17, 2011 02:21 PM

    Please have a look at the doc: White_Paper_-_CAF_Web_Service_Connector_Configuration.doc on this thread: CAF with flowservice deployed to test still points to dev - webMethods - Software AG Tech Community & Forums

    That will explain a variety of mechanisms for configuring your web service connectors. If you want to use these in your code, you would resolve the binding expressions to the local env variables. Find the variable in question from the bindings view, copy the binding expression and then if you want to access it in java, the code would be something like this:

    public int getSocketTimeout() {
    Object result = resolveExpression("#{environment['wsclient-socketTimeout']}");
    return Integer.parseInt(result.toString());
    }

    Hope this helps,
    –mark


    #webMethods
    #webMethods-BPMS
    #MWS-CAF-Task-Engine