Reputation: 11
I am trying to find a way to store all the transport headers in a property to restore them after a few validating security requests wchich overwrite the headers.
Currently, I'm trying to save the $axis2:TRANSPORT_HEADERS value in another property of the axis2 scope (because of the java.util.Map support).
<property action="set" expression="$axis2:TRANSPORT_HEADERS" name="Original_Headers" scope="axis2"/>
An then restoring them:
<property action="set" expression="$axis2:Original_Headers" name="TRANSPORT_HEADERS" scope="axis2"/>
But this is not working. It just overwrite the headers with nothing, like removing all of them.
Hope you can help me. Thank you!
Upvotes: 1
Views: 177
Reputation: 357
Please note that $trp Prefix used to get the transport headers.
I think you should use something like this instead :
<property expression="$trp:user-id" name="user-id" scope="default" type="STRING"/>
<property expression="$trp:country" name="country" scope="default" type="STRING"/>
let me know if it works fine for you.
Upvotes: 1