I have a SOAP service where I need to add one property to the XML Body prior to sending the request onto the backend service.
My Postman request is as below:
<?xml version="1.0" encoding="utf-8"?>
<Envelope xmlns="http://schemas.xmlsoap.org/soap/envelope/">
<Body>
<gprnEnquiry xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.somedomain.com">
<gprn>123456</gprn>
<registrationstatus>registrationstatus1</registrationstatus>
</gprnEnquiry>
</Body>
</Envelope>
I am passing in a Content-Type header of text/xml
My APIM Inbound policy is as below:
<set-body template="liquid">
<Envelope xmlns="http://schemas.xmlsoap.org/soap/envelope/">
<Body>
<gprnEnquiry xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.somedomain.com">
<gprn>{{body.gprnEnquiry.gprn}}</gprn>
<registrationstatus>{{body.gprnEnquiry.registrationstatus}}</registrationstatus>
<authKey>{{My-NamedValue}}</authKey>
</gprnEnquiry>
</Body>
</Envelope>
</set-body>
From enabling Request and response body capture in APIM I can see that the values from the request are coming in and the response is going out with no value.
Backend request
<Envelope
xmlns="http://schemas.xmlsoap.org/soap/envelope/">
<Body>
<gprnEnquiry
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://www.somedomain.com">
<gprn></gprn>
<registrationstatus></registrationstatus>
<authKey>xxxxxxxxxxx</authKey>
</gprnEnquiry>
</Body>
</Envelope>
Anyone have an idea why the values from the source request are not being mapped through to the back end request?