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
Expand all | Collapse all

How to call a java service from another java service

  • 1.  How to call a java service from another java service

    Posted Fri October 05, 2012 06:33 PM

    I have a setup of

    JavaFolder
    java_service1
    java_service2
    java_service3

    In the code of java_service3 I want to call java_service2. I have existing code that calls this like the following but it lists it as an undefined function (red underline). When I debug this code it highlights the call in green and then errors out on the next step. I am not sure why this is not working but this service when run does run…

    Should this be a valid way to call a java service from a java service?

    if (expire == 0) {
    java_service2(pipeline);
    }


    #webMethods
    #Flow-and-Java-services
    #Integration-Server-and-ESB


  • 2.  RE: How to call a java service from another java service

    Posted Mon October 08, 2012 06:23 AM

    You can try using Service.doInvoke() to invoke a java service from another java service. For more information, please check the webMethods java API.

    Cheers,
    Sasanka


    #Flow-and-Java-services
    #Integration-Server-and-ESB
    #webMethods


  • 3.  RE: How to call a java service from another java service

    Posted Fri October 19, 2012 09:29 AM

    In generate code option …select the type2 as select this service for calling from other service and then paste that generated code in the actual or destination service. And pass the arguments as you want.


    #Flow-and-Java-services
    #webMethods
    #Integration-Server-and-ESB