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

Receive JSON http response when invoking webMethods flow

  • 1.  Receive JSON http response when invoking webMethods flow

    Posted Fri May 06, 2016 02:52 PM

    Hi there,

    Is it possible to receive a http response in form of JSON when invoking a webMethods flow?
    When performing an invoke I always get a http response in form of html. I would like to receive a plain JSON as response.
    Thank you and best regards


    #Integration-Server-and-ESB
    #webMethods


  • 2.  RE: Receive JSON http response when invoking webMethods flow

    Posted Fri May 06, 2016 04:40 PM

    in your service, call: pub.flow:setResponse
    and set:
    response with your json string
    contentType with application/json


    #Integration-Server-and-ESB
    #webMethods


  • 3.  RE: Receive JSON http response when invoking webMethods flow

    Posted Fri May 06, 2016 05:17 PM


  • 4.  RE: Receive JSON http response when invoking webMethods flow

    Posted Fri May 06, 2016 08:47 PM

    Do you invoke the service via http? I.e. using the …/invoke/service.path URL? Then just set the Accept header of the request to the desired mime type, and the server will return the data in the desired format. I think, HTML, XML and JSON are supported (at least).

    This is a better way IMO since you don’t need to modify the service and the client decides which format should be delivered.


    #Integration-Server-and-ESB
    #webMethods