2021年5月6日星期四

Convert a SOAP response with CDATA to JSON in mule 4

I have this kind result of coming from a soap response in mule 4.

{ body:<web:getRoutesResponse xmlns:web="http://www.example.org/Bookings/"> <out><![CDATA[<?xml version="1.0"encoding="utf-8"?><ROUTELIST><ROUTEINFO> <ORIGIN>MY-KUL</ORIGIN><DESTINATION>SG-BEU</DESTINATION><ROUTEINFO></ROUTELIST>]]></out> </web:getRoutesResponse> , headers: [], attachments: [] }

I want to make in this json output which have array of origin and destination

[ { "origin": "MY-KUL", "destination": "SG-BEU" } ]

https://stackoverflow.com/questions/67428008/convert-a-soap-response-with-cdata-to-json-in-mule-4 May 07, 2021 at 09:49AM

没有评论:

发表评论