Hi guys I have some issue with soap message.
I am extracting books, author id from query params and generating an soap payload using Assign Message. When I hit the url and check the cURL from request sent to target server section in trace, I get,
curl -X POST -H 'Authorization: *****' -H 'Cache-Control: no-cache' -H 'Content-Type: application/xml' -H 'X-Forwarded-Port: 80' -d '<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Header/><soapenv:Body><Search><books><bookid>205</bookid><bookid>201</bookid><bookid>203</bookid>
</books><author><authorid>PMS-425-01</authorid><authorid>PMS-425-02</authorid><authorid>PMS-425-03</authorid>
</author>
</Search>
</soapenv:Body>
</soapenv:Envelope>' 'http://url/path'
Due to which I do not get desired output. I copied the soap message from cURL and beautified it and checked in normal postman then I get desired output.
So how/what can I do in Assign message policy to get each in new line?
This is my Assign message policy,
<Set>
<Payload content-type="application/xml">
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Header/>
<soapenv:Body>
<Search>
<books>
<bookid>{bookids}</bookid>
<bookid>{bookids2}</bookid>
<bookid>{bookids3}</bookid>
</books>
<author>
<authorid>{authorids}</authorid>
<authorid>{authorids2}</authorid>
<authorid>{authorids3}</authorid>
</author>
</Search>
</soapenv:Body>
</soapenv:Envelope>
</Set>
So desired cURL should be something like this,
curl -X POST -H 'Authorization: *****' -H 'Cache-Control: no-cache' -H 'Content-Type: application/xml' -H 'X-Forwarded-Port: 80' -d
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Header/>
<soapenv:Body>
<Search>
<books>
<bookid>{bookids}</bookid>
<bookid>{bookids2}</bookid>
<bookid>{bookids3}</bookid>
</books>
<author>
<authorid>{authorids}</authorid>
<authorid>{authorids2}</authorid>
<authorid>{authorids3}</authorid>
</author>
</Search>
</soapenv:Body>
</soapenv:Envelope>