axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "SAINI, Nishant, IDC" <>
Subject RE: Axis2 - How to set a header attribute from client that can be get in a Handler
Date Thu, 17 Apr 2008 07:12:35 GMT

I got some information from
and but
I wonder why this documentation is not available on website? Even there
are no links for this page on the site...

And who is managing this docs at and is it up to date? Etc.

Nishant Saini
Application Developer
RBS India Development Centre (P) Ltd

T  +91 124 672 4125
M +91 99 71 800 549
Unitech Business Park, Block F, Sector 41, South City, Phase 1,
Gurgaon - 122001, Haryana, India

The views expressed in above mail are not necessarily of my employer.

-----Original Message-----
From: Deepal jayasinghe []
Sent: Thursday, April 17, 2008 11:58 AM
Subject: Re: Axis2 - How to set a header attribute from client that can be get in a Handler

SAINI, Nishant, IDC wrote:
> Hi,
> I got the header set from client at server by using the following code:
>     public InvocationResponse invoke(MessageContext mc) throws AxisFault {
>         org.apache.axiom.soap.SOAPEnvelope env =  mc.getEnvelope();
>         SOAPHeader header = env.getHeader();
>         if(mc.getOptions().getTo().getAddress().endsWith("services/SimpleService")) {
>             Iterator iter = header.examineAllHeaderBlocks();
>             while(iter.hasNext()) {
>                 SOAPHeaderBlock headerBlock = (SOAPHeaderBlock);
>                 System.out.println(headerBlock);
>                 }
>             }
>         }
>         InvocationResponse ir = InvocationResponse.CONTINUE;
>         return ir;
>     }
> Can anybody please tell me how can I set the header block in response from server so
that I can access it from client?
You have to write a handler and deploy that in the out flow. So that
your handler will do what you want to do.
- Get the SOAP message from the message context and then add your header

Thank you!

To unsubscribe, e-mail:
For additional commands, e-mail:

The Royal Bank of Scotland plc. Registered in Scotland No 90312. Registered Office: 36 St
Andrew Square, Edinburgh EH2 2YB. 
Authorised and regulated by the Financial Services Authority 
This e-mail message is confidential and for use by the 
addressee only. If the message is received by anyone other 
than the addressee, please return the message to the sender 
by replying to it and then delete the message from your 
computer. Internet e-mails are not necessarily secure. The 
Royal Bank of Scotland plc does not accept responsibility for 
changes made to this message after it was sent. 

Whilst all reasonable care has been taken to avoid the 
transmission of viruses, it is the responsibility of the recipient to 
ensure that the onward transmission, opening or use of this 
message and any attachments will not adversely affect its 
systems or data. No responsibility is accepted by The 
Royal Bank of Scotland plc in this regard and the recipient should carry 
out such virus and other checks as it considers appropriate. 
Visit our websites at:

This email has been scanned by the MessageLabs Email Security System.
For more information please visit 

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message