You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Sebastian Krueger <se...@gmail.com> on 2010/03/10 02:07:54 UTC
getting access to soap header
Hi,
is there a way to access soap headers once the
org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor has completed
processing?
I have found that the resulting XMLStreamReader only contains the SOAP:Body
element, however I have a need to access the SOAP headers as well.
Thanks, Sebastian.
Re: getting access to soap header
Posted by Daniel Kulp <dk...@apache.org>.
On Tuesday 09 March 2010 8:07:54 pm Sebastian Krueger wrote:
> Hi,
>
> is there a way to access soap headers once the
> org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor has completed
> processing?
>
> I have found that the resulting XMLStreamReader only contains the SOAP:Body
> element, however I have a need to access the SOAP headers as well.
>
> Thanks, Sebastian.
If you are in an interceptor, you can do :
import org.apache.cxf.headers.Header;
...
List<Header> heads = message.get(Header.HEADER_LIST);
and you would get the headers in form you can muck with. Also, after the
wss4j stuff runs, you could also do:
message.getContent(SOAPMessage.class) to get the raw saaj model and grab
headers that way if needed.
--
Daniel Kulp
dkulp@apache.org
http://dankulp.com/blog