Hi Shah,
Have you tried specifying your message name as a string literal, ie
<apigw:set-payload message="'message'" value="webservicerequest"/>
I believe both attributes specify an XPath, so you could have your specific message name in a variable and then have message="$msgVar" just as you currently have value="webservicerequest" where webservicerequest is the root element of your stylesheet's input matched by your template. I'll make a note to ask our information developer to add an example to https://www.ibm.com/docs/en/datapower-gateway/10.5.x?topic=elements-apigwset-payload as that would be beneficial in my opinion.
Regards,
Steve
------------------------------
Steve Linn
Senior Consulting I/T Specialist
IBM
------------------------------
Original Message:
Sent: Mon March 18, 2024 05:21 AM
From: Shah Wajahat
Subject: XML Value
Hi Steve Linn
I have follow the above instruction but I get nothing I have attached the Screenshot In first xslt I have set the value in message variable and second I get the set variable value.


------------------------------
Shah Wajahat
Original Message:
Sent: Thu March 14, 2024 11:37 AM
From: Steve Linn
Subject: XML Value
Hi Shah,
The output of your first xslt policy will always be saved into the API Gateway Context's message.body. On the invoke policy that follows, you have the option to save the response to some context message using the output property, with "message" being the default message, ie, message.body, message.headers, and message.status will be updated by the invoke policy. If you're using the default, then you have effectively overwritten the result of the first xslt policy. Instead, specify a different message on the output property of the invoke, for example, specify "invokeResponse" then the invoke will update invokeResponse.body, invokeResponse.headers, invokeResponse.status. Now message.body from the first xslt will be available for your second xslt policy. The second xslt can consume message.body by using the input check box on the xslt policy, or within the xslt policy using the apigw:read-payload extension function, specifying the message name of "message" for message.body or "invokeResponse" for invokeResponse.body. Documentation on this extension function can be found at https://www.ibm.com/docs/en/datapower-gateway/10.5.0?topic=functions-apigwread-payload. The output of your second xslt policy will also be message.body, overwriting your first xslt policy output, so if you need that further, you'll need to use either use a set variable policy to copy message.body to some other context variable, or you could also within your first xslt stylesheet use a set-payload extension element, see https://www.ibm.com/docs/en/datapower-gateway/10.5.0?topic=elements-apigwset-payload, to save the same output so it doesn't get overwritten.
Regards,
Steve
------------------------------
Steve Linn
Senior Consulting I/T Specialist
IBM
Original Message:
Sent: Thu March 14, 2024 07:19 AM
From: Shah Wajahat
Subject: XML Value
I have two xml Policy between these two xml policy have invoke police. I want to use the element value of first xml to second XML Policy. Please tell me how can use it.

------------------------------
Shah Wajahat
------------------------------