Thanks Thilna. This approached worked for me.

I have one more question. After getting an header, is their a way to
generate an XML out of it ? 


Abhay Srivastava
Reference Architecture
Shared Services and Architecture | Smith Barney Technology | CitiGroup
GWM | New York
(212)  657 - 9358

-----Original Message-----
From: Thilina Gunarathne [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, May 13, 2008 3:04 PM
To: [email protected]
Subject: Re: Accessing SOAP Header in Web Service implementation

Hi,
Try the following inside your service implementation, if you just need
to access the incoming headers.

                MessageContext messageContext = MessageContext
                                .getCurrentMessageContext();
                SOAPHeader header
=messageContext.getEnvelope().getHeader();
                System.out.println(header);

thanks,
Thilina

On Mon, May 12, 2008 at 2:44 PM, Srivastava, Abhay
<[EMAIL PROTECTED]> wrote:
> Thanks correct Davanum.
>
>  I just want to access/print incoming SOAP headers.
>
>
>
>  Abhay Srivastava
>  Reference Architecture
>  Shared Services and Architecture | Smith Barney Technology | 
> CitiGroup  GWM | New York
>  (212)  657 - 9358
>
>
>
> -----Original Message-----
>  From: Davanum Srinivas [mailto:[EMAIL PROTECTED]
>  Sent: Monday, May 12, 2008 2:10 PM
>  To: [email protected]
>  Subject: Re: Accessing SOAP Header in Web Service implementation
>
>  Saminda,
>
>  My wild guess is he just wants the incoming soap headers :)
>
>  -- dims
>
>  On Mon, May 12, 2008 at 2:06 PM, Saminda Abeyruwan 
> <[EMAIL PROTECTED]>
>  wrote:
>  > Unless you have write you own message receiver to inject the soap  
> > header block to the web service, using current MRs you want be able 
> to
>
>  > access the soap header blocks. SOAP headers are meant to be 
> processed  > through the handlers. i.e you need to write an axis2 
> module. Please  > refer [1] for more details.
>  >
>  > Thank you!
>  >
>  > Saminda
>  >
>  >
>  > Reference:
>  >
>  > [1]. http://ws.apache.org/axis2/1_4/toc.html
>  >
>  >
>  >
>  > On Mon, May 12, 2008 at 11:16 PM, Srivastava, Abhay  > 
> <[EMAIL PROTECTED]> wrote:
>  >
>  > >
>  > >
>  > > Axis2
>  > >
>  > >
>  > >
>  > > Abhay Srivastava
>  > > Reference Architecture
>  > > Shared Services and Architecture | Smith Barney Technology |  > >

> CitiGroup GWM  > | New York  > > (212)  657 - 9358  > >  > >  > >  > >

> ________________________________  >  From: Saminda Abeyruwan 
> [mailto:[EMAIL PROTECTED]  > > Sent: Monday, May 12, 2008 1:45 PM  >

> > To: [email protected]  > > Subject: Re: Accessing SOAP Header 
> in Web Service implementation  > >  > >  > >  > >  > >  > > Axis2 or 
> Axis 1.x ?
>  > >
>  > > Saminda
>  > >
>  > >
>  > > On Mon, May 12, 2008 at 8:28 PM, Srivastava, Abhay  > 
> <[EMAIL PROTECTED]> wrote:
>  > >
>  > > > Hello Folks,
>  > > >       I am trying to access SOAP header in the implementation
code
>
>  > > > of Axis web service. Can somebody help me here ?
>  > > >
>  > > > Thanks,
>  > > >
>  > > > Abhay Srivastava
>  > > > Reference Architecture
>  > > > Shared Services and Architecture | Smith Barney Technology |  >

> > > CitiGroup GWM | New York  > > > (212)  657 - 9358  > > >  > > > 
> ------------------------------------------------------------------
>  > > > --- To unsubscribe, e-mail: [EMAIL PROTECTED]
>  > > > For additional commands, e-mail: [EMAIL PROTECTED]  >

> > >  > > >  > >  > >  > >  > > --  > > Saminda Abeyruwan  > >  > > 
> Senior Software Engineer  > > WSO2 Inc. - www.wso2.org  >  >  >  > --

> > Saminda Abeyruwan  >  > Senior Software Engineer  > WSO2 Inc. - 
> www.wso2.org
>
>
>
>  --
>  Davanum Srinivas :: http://davanum.wordpress.com
>
>  ---------------------------------------------------------------------
>  To unsubscribe, e-mail: [EMAIL PROTECTED]
>  For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>  ---------------------------------------------------------------------
>  To unsubscribe, e-mail: [EMAIL PROTECTED]
>  For additional commands, e-mail: [EMAIL PROTECTED]
>
>



--
Thilina Gunarathne - http://thilinag.blogspot.com

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to