AnsweredAssumed Answered

API gateway 9.0 - problem in json to xml assertion

Question asked by MKarthik on Nov 8, 2016
Latest reply on Apr 12, 2017 by Rudra_Singh

Hi ,
   We are on version 9.0 of API gateway and when using json to xml transformation ( standard Transformation convention ) we see a rearrangement of sequence of elements in the converted output xml when compared to the input json :

Is there a way to avoid the assertion from not rearranging the sequence when converting from json to xml ? The rearrangement is causing issues since the output xml is used to route to a SOAP service that is expecting the sequence of xml elements to be the same as it occurs on the input json payload


This is causing a problem since we are using the output xml to be put into a SOAP body and routing to a SOAP service end point that is particular about the sequence of elements occurring in the payload submitted to it.


Input Json :

"First_Name": "Lei",
"Impact": "4-Minor/Localized",
"Last_Name": "Liu",
"Reported_Source": "Web",
"Service_Type": "User Service Request",
"Status": "New",
"Action": "CREATE",
"Summary": "test",
"Notes": "test",
"Urgency": "4-Low",
"Template_Name": "Create New SRM Profile",
"Vendor_Ticket_Number": "TKT-123",
Output XML :
<?xml version="1.0" encoding="UTF-8"?>
    <Template_Name>Create New SRM Profile</Template_Name>
    <Service_Type>User Service Request</Service_Type>