Hi Nuwan, Thanks a lot. I'm worried about the latency overhead these conversions add as I would be working with large payloads. @Isuru, Shafreen, Would you let me know/share resources, if there's a way to bypass these conversions. @All, Is there an initiative to to migrate from XML and intermediate SOAP based message handling in future versions as JSON is faster in parsing and XML is slow and cumbersome? Thanks. Regards, Amitha
On Sep 26 2018, at 7:29 pm, Nuwan Dias <[email protected]> wrote: > > Adding Isuru and Shafreen. > > The mediation engine (EI/API Gateway) supports transforming or changing > messages from various protocols to various other protocols. Such as from XML > to JSON, from Text to XML, from form-url to JSON, likewise. To support these > various types of transformations, upon receiving a message the engine would > first convert it into a common base, and then convert it to the requested > base, likewise. Without doing which, the combinations of these > transformations would be endless. In the case of EI/API Gateway, this common > base is XML. So every message, if you need to process it, is first converted > to XML and then all changes or transformation are done on the particular XML > message and then converted to whatever the requested format is. So as far as > I know you can't work with the message on plain JSON format only. However, > I've added two of my colleagues who have a better idea about this than me to > see if this is possible. > > Thanks, > NuwanD. > > > On Wed, Sep 26, 2018 at 2:11 PM Amitha Dissanayake <[email protected] > (mailto:[email protected])> wrote: > > Hi Nuwan, > > > > Thanks a lot for the prompt response. That document helped. However, my > > original question still remains unresolved to me. > > More specifically, when using the class mediator, I used the property > > mediator and received the JSON string to the class. But I still have to > > convert to XML and load it to the axis2 context message envelope (i.e. > > SOAP). > > <property name="messageType" value="application/json" scope="axis2"/> > > <property name="JSON-Payload" expression="json-eval($.)"/> > > >
_______________________________________________ Dev mailing list [email protected] http://wso2.org/cgi-bin/mailman/listinfo/dev
