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.  calling another IS service

    Posted Thu December 10, 2009 06:20 PM

    Hi all ,
    I need to call a service of another IS service thru java service.
    We have clinet.http built in service , but i need that in java services.
    I searched so much in java APIs , but unable to find anything related to my req.
    Suggest me how to do that or code ?
    Its an urgent .

    Regards ,
    sevenwaves


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


  • 2.  RE: calling another IS service

    Posted Thu December 10, 2009 06:24 PM

    you can call any service from java service. This will be achived by using method Service.doInvoke(…). Please do search again in this forum with “doInvoke”, you will find many useful posts.


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


  • 3.  RE: calling another IS service

    Posted Fri December 11, 2009 02:59 AM

    Thanks for reply.
    I tried with doInvoke…but am able to call the service of same server, not another server’s service.

    see for ex : i need call service “addInt” thru https .

    can u suggest what to do and hw to do

    Regards ,
    sevenwaves


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


  • 4.  RE: calling another IS service

    Posted Fri December 11, 2009 03:18 AM

    When you want to invoke service which is available in another IS, you can use “pub.remote:invoke” service and provide service name as input to this service.

    So inside doInvoke, call “pub.remote:invoke” service, and pass the arguments as service name which is available in the other IS.

    For more info refer “7-1_Integration_Server_Built-In_Services_Reference.pdf”


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


  • 5.  RE: calling another IS service

    Posted Fri December 11, 2009 01:49 PM

    You also need to add the ‘another IS’ as remote server on your IS and you have to give Alias of your remote IS to the pub.remote:invoke service.


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


  • 6.  RE: calling another IS service

    Posted Fri December 11, 2009 05:06 PM

    Use Service.doInvoke() to call pub.client:http, if you really want to do what you’re doing from a Java service.

    I assume you’re doing some simple proof of concept since calling addInt remotely seems a bit odd to do for real. :slight_smile:

    I would recommend not using pub.remote:invoke. Nor doing such a call in a Java service.

    Use the provided pub.client:http to do the work, that way your solution is not assuming that the called component is hosted on another IS.

    Is there a specific reason you need to do this from a Java service?


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


  • 7.  RE: calling another IS service

    Posted Sat December 12, 2009 07:52 AM

    Hi,
    In your java service you can use ‘Context’ class and invoke the method ‘connect’ for connecting to your remote server and then use ‘invoke’ method for invoking service on remote server.
    Hope this will help.

    Regards,
    Vikas


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