Hi Amitha, Maybe this document [1] would help you understand how to deal with JSON payloads better.
[1] - https://docs.wso2.com/display/EI630/Working+with+JSON+Message+Payloads Thanks, NuwanD. On Wed, Sep 26, 2018 at 10:01 AM Amitha Dissanayake <[email protected]> wrote: > Hi, > > I'm a developer who's exploring API Manager. When I was attempting to > retrieve the JSON payload form a Context Message during mediation (out > sequence), I observed that the payload it attached in a SOAP Envelope > inside the Axis2 Context Message. However, I'm receiving the response from > a REST endpoint. > > In that case I had to convert the SOAP Evelope XML to JSON, then modify > the changes and again convert it to XML and attach to Axis2 Context > Message. In that operation, 4 conversions happen. That is, > > 1. Between the endpoint and mediation point. JSON to XML > 2. During mediation, I convert XML to JSON and do the operation, > 3. I again convert the JSON to XML and attach to the axis2 message. > 4. Postman receives a JSON; means XML has again been converted inside > the API Manager. > > > When I ran the mediation on debug mode, I observed that the content is > received as SOAPAction to the mediation point. > > I feel that this adds an unnecessary latency overhead or I am doing > something wrong in the process. Is there a way to overcome this issue/ > directly access the JSON payload or what is the correct way to access the > JSON payload without too many conversions? > > Thanks in Advance. > > Regards, > > Amitha Dissanayake > Senior Software Engineer [image: Logo] <https://www.yaalalabs.com/> > > Yaala Labs > 14 Sir Baron Jayathilake Mawatha > Colombo 1, Sri Lanka > m: + 94 77 548 1350 > e: [email protected] > > www.yaalalabs.com [image: LinkedIn icon] > <https://www.linkedin.com/company/yaalalabs/> > _______________________________________________ > Dev mailing list > [email protected] > http://wso2.org/cgi-bin/mailman/listinfo/dev > -- *Nuwan Dias* | Director | WSO2 Inc. (m) +94 777 775 729 | (e) [email protected] [image: Signature.jpg]
_______________________________________________ Dev mailing list [email protected] http://wso2.org/cgi-bin/mailman/listinfo/dev
