Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Cant we give some custom message type variable name to xslt policy source element

Im having a proxy where the request json content first goes through the jsontoxml policy and in this policy Im having <OutputVariable> element with custom variable like xmlRequestPayload and whenever I try to use this custom variable (xmlRequestPayload) as a value to the <Source> element in next right to the policy of XSLT, Im always getting runtime error like InvalidSource

Are we not allowed to give any other custom message content variable names to this XSLT source element instead of  request, response & message

Can someone clarify this, please.....

Solved Solved
0 2 129
1 ACCEPTED SOLUTION

It's not the name of the Source that matters: it's the type of the Source. 

For Source, you need to use a variable that is of type Message. See the docs.

Your variable is a string. It needs to be a message, and it needs to have an xml content-type.  

This is a FAQ. I'm typing this response on my phone. You may find more details if you search the community site with "xsltransform source", or similar. 

Good luck. 

View solution in original post

2 REPLIES 2

Hey @Teja, we’ve seen that your question hasn’t gotten a response yet. We’ll keep checking in on this thread and encourage other members to share their thoughts.

It's not the name of the Source that matters: it's the type of the Source. 

For Source, you need to use a variable that is of type Message. See the docs.

Your variable is a string. It needs to be a message, and it needs to have an xml content-type.  

This is a FAQ. I'm typing this response on my phone. You may find more details if you search the community site with "xsltransform source", or similar. 

Good luck.