You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@synapse.apache.org by David Purcell <Da...@csu.mnscu.edu> on 2008/01/15 21:13:04 UTC
expression to get values from soap:header
Hello,
I'm setting some custom child elements in the soap:header of a request, and wanted to pull them down for logging in a synapse log or dbreport mediator. But I'm not sure how to craft the expression. It seems like the soap:body payload is accessible via expressions (that works fine), but not soap:header values.
Any hints would be appreciated.
Thanks,
David
===============================
David Purcell
Systems Architect
MN State Colleges and Universities
david.purcell@csu.mnscu.edu
==============================+
---------------------------------------------------------------------
To unsubscribe, e-mail: synapse-user-unsubscribe@ws.apache.org
For additional commands, e-mail: synapse-user-help@ws.apache.org
Re: expression to get values from soap:header
Posted by Upul Godage <up...@gmail.com>.
Hi,
You can get the headers for example in the log mediator like this,
<log level="custom">
<property xmlns:s11="
http://schemas.xmlsoap.org/soap/envelope/"
xmlns:s12="http://www.w3.org/2003/05/soap-envelope"
name="headers" expression="s11:Header/* |
s12:Header/*"/>
</log>
Here the expression is written to get both headers in SOAP 1.1 and
1.2envelopes. You can change the XPath expression to get a specific
header
element.
Hope this helps.
Upul
On Jan 16, 2008 1:43 AM, David Purcell <Da...@csu.mnscu.edu> wrote:
> Hello,
>
> I'm setting some custom child elements in the soap:header of a request,
> and wanted to pull them down for logging in a synapse log or dbreport
> mediator. But I'm not sure how to craft the expression. It seems like the
> soap:body payload is accessible via expressions (that works fine), but not
> soap:header values.
>
> Any hints would be appreciated.
>
> Thanks,
>
> David
>
> ===============================
> David Purcell
> Systems Architect
> MN State Colleges and Universities
> david.purcell@csu.mnscu.edu
> ==============================+
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: synapse-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: synapse-user-help@ws.apache.org
>
>