axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Xinjun Chen" <xjchen...@gmail.com>
Subject [Axis2][0.95] How to add a HeaderBlock
Date Fri, 24 Mar 2006 13:02:45 GMT
Hi,

I am trying to add a HeaderBlock to a SOAPEnvelope in Axis2.
It seems that Axis2 0.95 changed much from 0.94. So many package names
and classes are changed. Will this happen in Axis2 1.0? Should I
proceed with Axis2 0.95 or wait for Axis2 1.0?

The OM module in 0.94 seems have been moved to Axiom API and Axiom-Impl.

How can I add a HeaderBlock using Axis2 0.95? Take the following code
for an example. Currently, I have already get the original
SOAPEnvelope object "envelope" with only "Body" part, and I have got
the document object representation of the header block as the
following,

<wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
<wsse:UsernameToken
xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
<wsse:Username xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
xinjun</wsse:Username>
<wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText"
xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
password</wsse:Password>
</wsse:UsernameToken>
</wsse:Security>

How can I add this header correctly?
I tried envelope.getHeader().addHeaderBlock(String, OMNamesapce). But
How should I use it? How to set the parameters?

Regards,
Xinjun

Mime
View raw message