Condition in REST to SOAP policy
Content
Hi gurus,
One of our APIs needs to have a REST to SOAP policy.
The JSON we are sending as a Request might have some null values. i.e.:
{
"Tag1": null,
"Tag2": "test",
"Tag3": 100
}
So we get an error in the REST to SOAP conversion when trying to construct the xml Tag1
<Envelope xmlns="http://www.w3.org/2003/05/soap-envelope">
<Body>
<Tag1 xmlns="http://namespace">${payload.Tag1}</Tag1>
<Tag2 xmlns="http://namespace">${payload.Tag2}</Tag2>
<Tag3 xmlns="http://namespace">${payload.Tag3}</Tag3>
</Body>
</Envelope>
Is there a way to add conditional logic in this policy to evaluate the value of a payload tag or do we need to do this validation in a groovy policy previous to this step?
Tagged:
0