We have an ExtractVariables Policy using XPath. It looks like this:
<ExtractVariables async="false" continueOnError="false" enabled="true" name="GetRequestBodyVariables">
<DisplayName>GetRequestBodyVariables</DisplayName>
<IgnoreUnresolvedVariables>true</IgnoreUnresolvedVariables>
<Source clearPayload="false">request</Source>
<XMLPayload stopPayloadProcessing="false">
<Namespaces>
<Namespace prefix="soap">http://schemas.xmlsoap.org/soap/envelope/</Namespace>
<Namespace prefix="atp">http://api.abc.com/AtpInquiryService_AWS/AtpInquiry</Namespace>
</Namespaces>
<Variable name="ashley.request.ExternalID" type="string">
<XPath>//soap:Envelope/soap:Body/atp:ATPRequest/atp:KeyOne</XPath>
</Variable>
<Variable name="private.request.KeyCode" type="string">
<XPath>//soap:Envelope/soap:Body/atp:ATPRequest/atp:KeyTwo</XPath>
</Variable>
</XMLPayload>
</ExtractVariables>
When passing a value with CDATA it evaluates as null, but if we don’t wrap it with CDATA it works as expected. As far as I know CDATA is fully supported in XPath. We have many other programs outside of Apigee that handle this without any problem. Is this a known issue? Is there a workaround?