Posted: Thu Feb 05, 2015 4:02 am Post subject: Data Power versus WMB for JSON to XML conversion
Centurion
Joined: 14 Feb 2008 Posts: 100
Hello All,
We have a requirement of taking the JSON message from user and convert it to XML before sending to backend application and after getting the response from back end send reply to user after converting it to JSON.
We have XI52 and WMB ( Broker V 7.0.0.6 ) installed. So the usual path a request will take is
User <-> XI52 <-> WMB <-> Back end
Client is insisting to have JSON to JSONX conversion done in DP and JSONX to be passed to WMB ( Reason - Data power does this conversion with preavailable Action and they do not want to use generic XSLT for JSONX to XML transformation in Data Power). So WMB need to use the JSONX data and convert it in XML and then send to backend. I found this as a very tedious job as JSONX is not very friendly to ESQL and we need to move through Object and attribute to fetch the data. Being WMB developer ( that's why I have posted it in WMB forum ) I want to check what are the advantage and disadvantage of getting the JSON message directly in Broker and do the transformation in WMB as it is supported in the fix pack version and very easy to traverse the JSON tree.
Also I could not find any thing for converting JSONX to xml directly in WMB. Please help me with pro and cons of following my approach.
Joined: 10 Feb 2003 Posts: 6076 Location: Somewhere over the Rainbow this side of Never-never land.
Version 7.0.0.* goes out of service in 6 months. I hope you are planning your upgrade now.
Have you tried using the JSON Parser in V7? It arrived in V7.0.0.2
I've used the V7.0.0.4 JSON Parser to parse data from AccuWeather into A broker Tree. You can convert that into that will be output as XML simply by changing the PARSER.
Something like
Code:
set OutputRoot.XMLNSC = InputRoot.JSON
_________________ WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995
Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum