Can i put a variable as a Source on the XSL transform policy or does it allow "request" as source only. I made a service callout and tried to use the response variable from service callout as Source on transform policy and it is giving error saying the source is not valid
Solved! Go to Solution.
Yes it works just fine. A working example is attached.
Import and Deploy it, then invoke it like this:
curl -i https://ORG-ENV.apigee.net/xsl-on-message/t1
You will see the output of the XSL transform, performed on a message that was assigned via AssignMessage.
Show us your policy config for the ServiceCallout and for the XSL policy. Maybe we can help diagnose what's wrong.
By the way, one thing that catches people is the Content-Type. if the content-type header on the Response from the ServiceCallout is not set to an XML type (like text/xml or application/xml) then the XSL will not run. It will just get skipped.
Yes it works just fine. A working example is attached.
Import and Deploy it, then invoke it like this:
curl -i https://ORG-ENV.apigee.net/xsl-on-message/t1
You will see the output of the XSL transform, performed on a message that was assigned via AssignMessage.
Show us your policy config for the ServiceCallout and for the XSL policy. Maybe we can help diagnose what's wrong.
By the way, one thing that catches people is the Content-Type. if the content-type header on the Response from the ServiceCallout is not set to an XML type (like text/xml or application/xml) then the XSL will not run. It will just get skipped.
Thank you much Dino! Setting the content-type to application/xml did the trick. I am guessing it is not possible to use multiple variable as a source on XSL transform. I wanted to mash up multiple responses using xslt
You guessed wrong!! You CAN mash up XML using the XSL policy.
https://community.apigee.com/questions/50645/is-it-possible-to-mashup-multiple-xml-documents-us.html
User | Count |
---|---|
3 | |
2 | |
1 | |
1 | |
1 |