axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Thilina Gunarathne" <cset...@gmail.com>
Subject Re: Accessing SOAP Header in Web Service implementation
Date Mon, 19 May 2008 14:30:43 GMT
Hi,
The header object you get is actually a Axiom OMElement[1], which is
the representation of XML element in Axiom+Axis2.

~Thilina

[1] http://ws.apache.org/commons/axiom/OMTutorial.html

On Wed, May 14, 2008 at 9:52 AM, Srivastava, Abhay
<abhay.srivastava@citi.com> wrote:
> 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:csethil@gmail.com]
> Sent: Tuesday, May 13, 2008 3:04 PM
> To: axis-dev@ws.apache.org
> 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
> <abhay.srivastava@citi.com> 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:davanum@gmail.com]
>>  Sent: Monday, May 12, 2008 2:10 PM
>>  To: axis-dev@ws.apache.org
>>  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
>> <samindaa@gmail.com>
>>  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  >
>> <abhay.srivastava@citi.com> wrote:
>>  >
>>  > >
>>  > >
>>  > > Axis2
>>  > >
>>  > >
>>  > >
>>  > > Abhay Srivastava
>>  > > Reference Architecture
>>  > > Shared Services and Architecture | Smith Barney Technology |  > >
>
>> CitiGroup GWM  > | New York  > > (212)  657 - 9358  > >  > >
 > >  > >
>
>> ________________________________  >  From: Saminda Abeyruwan
>> [mailto:samindaa@gmail.com]  > > Sent: Monday, May 12, 2008 1:45 PM  >
>
>> > To: axis-dev@ws.apache.org  > > 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  >
>> <abhay.srivastava@citi.com> 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: axis-dev-unsubscribe@ws.apache.org
>>  > > > For additional commands, e-mail: axis-dev-help@ws.apache.org  >
>
>> > >  > > >  > >  > >  > >  > > --  > >
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: axis-dev-unsubscribe@ws.apache.org
>>  For additional commands, e-mail: axis-dev-help@ws.apache.org
>>
>>
>>  ---------------------------------------------------------------------
>>  To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
>>  For additional commands, e-mail: axis-dev-help@ws.apache.org
>>
>>
>
>
>
> --
> Thilina Gunarathne - http://thilinag.blogspot.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-dev-help@ws.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-dev-help@ws.apache.org
>
>



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

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


Mime
View raw message