How to write a liquid template for SOAP XML to Custom JSON conversion.

Barath 21 Reputation points


My Goal: convert the SOAP XML response into a JSON response.


JSON Response I want to get it to:

My Liquid Template For This (XML to JSON):

Currently I am not getting output for the ProductId—I just get a "" return back. I can't figure out why this is happening. Not sure if this is a syntax issue in anyway. Using liquid templates, for XML to JSON conversion, how should the ".liquid" file be written in order to achieve the expected JSON response?

Please note, this ".liquid" file is added through "Maps" in an integration account connected to a logic app. The logic app is using the XML to JSON conversion action.

Thank you a lot for the help. Looking forward.

Reference/Credits (for XML):

Azure Logic Apps
Azure Logic Apps
An Azure service that automates the access and use of data across clouds without writing code.
2,969 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Barath 21 Reputation points


    I have resolved this issue. For people referring to this in the future, here is the solution: simply ignore the prefix. That is, the templating will be:

    {<!-- -->{ content.Envelope.Body.PriceList_Response.PriceList.prices.price.productId }}

    This will work.

    Suppose you have soapenv:Envelope, just do Envelope by itself. Ignore prefix.

    P.S. I recommend the MS team to leave this question publicly available as there are very limited resources regarding liquid templates.

    0 comments No comments