webMethods

webMethods

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 a url that returns JSON, how to process the JSON

    Posted Tue May 19, 2020 07:18 AM

    Hi

    I need to call this url

    http://api.exchangeratesapi.io/2020-05-01?symbols=USD,GBP&base=DKK

    which will return this JSON

    {“rates”:{“EUR”:0.1340770138},“base”:“DKK”,“date”:“2020-04-30”}

    How should I do that in webMethods? I use version 10.3

    If the url returned xml I could use this service pub.xml:loadXMLNode where I will be able to specify the url as an input variable.

    Kind regards Mikael


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


  • 2.  RE: calling a url that returns JSON, how to process the JSON

    Posted Tue May 19, 2020 08:10 AM

    Using pub.client:http and setting “useJSSE” = yes made it work and method = get.


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


  • 3.  RE: calling a url that returns JSON, how to process the JSON

    Posted Tue May 19, 2020 08:22 AM

    first use pub.string:bytesToString service to convert “body/bytes” to String. Then use pub.json:jsonStringToDocument service to convert JSON string Document.


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


  • 4.  RE: calling a url that returns JSON, how to process the JSON

    Posted Fri May 22, 2020 04:54 PM

    Also - you would not want to call URL with parameters in the URL and instead parameterise in your service.


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