0 Replies Latest reply on Jul 22, 2015 10:05 AM by Seb Xavier

    calling external service accepting and returning json

    Seb Xavier Newbie

      I am quite new to Switchyard. I need to create an application, which would expose a REST based webservice and this needs to call an external 3rd party webservice.

      We need to call this 3rd party service via POST method and it accepts a JSON request.It also returns a JSON object.

       

      From my switchyard application I have created the component service and the bean component that will connect to a reference component and this reference component has been given an HTTP binding.

       

      The bean calls the service passing in the JSON request as a String. The return from the call is an instance of java.io.StringReader. The plan is to convert the response String value from the StringReader back to POJO using Jacksons ObjectMapper class.

      Is this the standard way of doing this or can transformations be used here.

       

      Can anyone point me in the right direction or some similar examples. I haven't been able to see so far any similar scenarios in the Quickstart samples that does this.