I am trying to transform a JSON
response from a target end point into soap message. I have 2 policies in the post flow.
JSONTOXML
- If I disablexsltransform
I see the xml result so this work.xsltransform
- this just point to my xsltransform file which has the template and dynamic content supposed to come from the xml from step 1.
Both source and output are set to "response" but it looks like it failed to cast in step 2. What should I make step 2 to pick up the xml and apply the xsl
? How else can I do this? Thanks
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<JSONToXML async="false" continueOnError="false" enabled="true" name="jsontoxml-2">
<DisplayName>JSONtoXML-2</DisplayName>
<FaultRules/>
<Properties/>
<Options>
<NullValue>NULL</NullValue>
<NamespaceBlockName>#namespaces</NamespaceBlockName>
<DefaultNamespaceNodeName>$default</DefaultNamespaceNodeName>
<NamespaceSeparator>:</NamespaceSeparator>
<TextNodeName>#text</TextNodeName>
<AttributeBlockName>#attrs</AttributeBlockName>
<AttributePrefix>@</AttributePrefix>
<InvalidCharsReplacement>_</InvalidCharsReplacement>
<ObjectRootElementName>Root</ObjectRootElementName>
<ArrayRootElementName>Array</ArrayRootElementName>
<ArrayItemElementName>Item</ArrayItemElementName>
</Options>
<OutputVariable>response</OutputVariable>
<Source>response</Source>
</JSONToXML>
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<XSL async="false" continueOnError="false" enabled="true" name="xsltransform-1">
<DisplayName>XSLTransform-1</DisplayName>
<FaultRules/>
<Properties/>
<Source>response</Source>
<ResourceURL>xsl://xsltransform-1</ResourceURL>
<Parameters ignoreUnresolvedVariables="true"/>
<OutputVariable>response</OutputVariable>
</XSL>