Dear Admin,
I have a requirement to assign dynamic message body for a empty soap request basically null request body. When I set Apply XSLT Transformation assertion to the request message with desired xslt transformation, getting error like below.
Request Headers: Content-Type text/xml
Request Body: empty
Transform Assertion: XSLT Transformation assertion (backend service is SOAP)
Request: {}
Response:
<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<soapenv:Fault>
<faultcode>soapenv:Server</faultcode>
<faultstring>Policy Falsified</faultstring>
<faultactor>https://server/rd/GetDesiredResults</faultactor>
<detail>
<l7:policyResult status="Bad Request" xmlns:l7="http://www.layer7tech.com/ws/policy/fault"/>
</detail>
</soapenv:Fault>
</soapenv:Body>
</soapenv:Envelope>
Time | Severity | Code | Message |
20180807 17:18:30.809 | INFO | 5900 | Message not XML; cannot perform XSL transformation |
Intention is request is empty body, and backend routing service has fixed body. So when API is invoked client won't pass any body (basically null value in request.main part) however he suppose to get the desired response.