So I want to pass a values from one proxy to another.
I have set the transport header in main proxy to outbound request, and set the value in http:Accept
to some variable.
Now I'm accessing the value in another proxy using $inbound/ctx:transport/ctx:request/tp:headers/http:Accept
and it's not working.
How do I get this value?
I'm calling the other proxy using routing.
As the ways you want to send the message by header from Sender(ProxyService) to Receiver(ProxyService) can use the stage action "TransportHeader" At the TransportHeader :
Set the direction header to OutboundRequest
Set hit the add header and click "Other" and "Set Header To" radio Button
At the "Other" field set the variable name that can be called to Sender(ProxyService) and at "Set Header To" put the value that to be stored in variable name.
[enter image description here][1]
[1]: https://i.sstatic.net/1Cczc.pngstrong text
At the end at the receiver(ProxyService), calling the variable from Sender(ProxyService) was like:
data($inbound/ctx:transport/ctx:request/tp:headers/tp:user-header[@name='RqUuid']/@value)
And keep the message in variable