Return-Path: Delivered-To: apmail-ws-axis-user-archive@www.apache.org Received: (qmail 15579 invoked from network); 21 May 2007 04:17:21 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 21 May 2007 04:17:21 -0000 Received: (qmail 78077 invoked by uid 500); 21 May 2007 04:17:17 -0000 Delivered-To: apmail-ws-axis-user-archive@ws.apache.org Received: (qmail 78052 invoked by uid 500); 21 May 2007 04:17:17 -0000 Mailing-List: contact axis-user-help@ws.apache.org; run by ezmlm Precedence: bulk Reply-To: axis-user@ws.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list axis-user@ws.apache.org Received: (qmail 78041 invoked by uid 99); 21 May 2007 04:17:17 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 20 May 2007 21:17:17 -0700 X-ASF-Spam-Status: No, hits=2.0 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: domain of keithgchapman@gmail.com designates 209.85.132.249 as permitted sender) Received: from [209.85.132.249] (HELO an-out-0708.google.com) (209.85.132.249) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 20 May 2007 21:17:10 -0700 Received: by an-out-0708.google.com with SMTP id d11so438429and for ; Sun, 20 May 2007 21:16:49 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=tUBP53yclp49PX4hMxWPPd9cCWqrBgpYp5HNeTkUE7wOma4/AqriZVg+15p57jifnY9yWeB/n2ymLz6jEtyHXiHOpmFRZb0lts+kpGPCpzJfIpbOUU+0FcvPMCiTMEvkIR67iydgTuWvaqUmpWC4sM9QFdfX6AxhRLpZ3V0On2M= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=WpGsD5FWVmmlXSiqqKwOJ4MxdGvZmGVBKWdAYuj4iIVVXV4diggMqQSbn2FLb2UjLeaVx8Tu3r9BAad5XlF9TG3NKnxmtB9RkWJRL+NfNdGxgQW+2wjPZPS1GyrymSLXqbHamUwNUqlgUzVYRMuWzSGQYqAL2pW3UEPq0cBXNSg= Received: by 10.100.94.3 with SMTP id r3mr2709450anb.1179721009737; Sun, 20 May 2007 21:16:49 -0700 (PDT) Received: by 10.100.144.4 with HTTP; Sun, 20 May 2007 21:16:49 -0700 (PDT) Message-ID: Date: Mon, 21 May 2007 09:46:49 +0530 From: "keith chapman" To: axis-user@ws.apache.org Subject: Re: [Axis2] SOAP header elements In-Reply-To: <58312.81105.qm@web37306.mail.mud.yahoo.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_100260_13920658.1179721009644" References: <329275.92036.qm@web37315.mail.mud.yahoo.com> <58312.81105.qm@web37306.mail.mud.yahoo.com> X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_100260_13920658.1179721009644 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi jack, U can use the following once you have the SOAPEnvelop to get the header block. SOAPHeader header = envelope.getHeader(); Once you get that you can get the specific header you want by using header.getHeaderBlocksWithNSURI(); or get all the headers and iterate through them using header.getChildren(); Once you have the header block you can drill down to the xmlBeans class. Thanks, Keith. On 5/21/07, Jack Sprat wrote: > > OK. I was able to get the header elements using the getChildElements() > method and iterating. > > But the XMLBenas question remains. How do I get at the class created by > XMLBeans for these 2 header elements? > > Thanks, > T > > > *Jack Sprat * wrote: > > Deepal, > > Thanks for the reply. > Yes, this is server side. I can get the SOAPEnvelope but then how do I > get the contents of the elements themselves? In this case it is a user and > password element. The Axis2 JavaDocs have a return value of > org.apache.axiom.soap.SOAPEnvelope for the getEnvelope() method but I > don't have any docs for that type. > > Also, does the class created by XMLBeans for the user and password > elements come into play at all? I was expecting to be able to pull in those > classes created by XMLBeans for these 2 elements. > > Thanks, > T > > > *Deepal Jayasinghe * wrote: > > Hi Jack , > If this is in the server side , you can get the message context and from > that you can get the SOAP envelope and from the soap envelope you can > get the soap headers. > > If it is the in the client side , the the process is , > - First you get the last operation context from the service client > - and then follow the above steps. > > Thanks > Deepal > > Can anyone answer this question? I thought this would be fairly > > common but I've not seen any tutorials or anything like that. > > Any help is appreciated. > > > > Thanks. > > T > > > > > > */Jack Sprat /* wrote: > > > > I am using Axis 1.2 with XML Beans and need to get the user and > > password SOAP header elements. I've set up an Axis2 handler and > > it is being called properly. > > My question is how exactly do I get the to the SOAP header elements? > > > > Thanks. > > T > > > > > Shape Yahoo! in your own image. Join our Network Research Panel today! > http://us.rd.yahoo.com/evt=48517/*http://surveylink.yahoo.com/gmrs/yahoo_panel_invite.asp?a=7hot CTA = Join our Network Research Panel > > > ------------------------------ > Pinpoint customers > who > are looking for what you sell. > > -- Keith Chapman WSO2 Inc. Oxygen for Web Services Developers. http://wso2.org/ ------=_Part_100260_13920658.1179721009644 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi jack,

U can use the following once you have the SOAPEnvelop to get the header block.

SOAPHeader header = envelope.getHeader();

Once you get that you can get the specific header you want by using
header.getHeaderBlocksWithNSURI();

or get all the headers and iterate through them using
header.getChildren();

Once you have the header block you can drill down to the xmlBeans class.

Thanks,
Keith.


On 5/21/07, Jack Sprat <rexclaimer2@yahoo.com> wrote:
OK.  I was able to get the header elements using the getChildElements() method and iterating.

But the XMLBenas question remains.  How do I get at the class created by XMLBeans for these 2 header elements?

Thanks,
T


Jack Sprat <rexclaimer2@yahoo.com> wrote:
Deepal,

Thanks for the reply.
Yes, this is server side.  I can get the SOAPEnvelope but then how do I get the contents of the elements themselves?  In this case it is a user and password element.  The Axis2 JavaDocs have a return value of
org.apache.axiom.soap.SOAPEnvelope for the getEnvelope() method but I don't have any docs for that type.

Also, does the class created by XMLBeans for the user and password elements come into play at all?  I was expecting to be able to pull in those classes created by XMLBeans for these 2 elements.

Thanks,
T


Deepal Jayasinghe <deepal@opensource.lk> wrote:
Hi Jack ,
If this is in the server side , you can get the message context and from
that you can get the SOAP envelope and from the soap envelope you can
get the soap headers.

If it is the in the client side , the the process is ,
- First you get the last operation context from the service client
- and then follow the above steps.

Thanks
Deepal
> Can anyone answer this question? I thought this would be fairly
> common but I've not seen any tutorials or anything like that.
> Any help is appreciated.
>
> Thanks.
> T
>
>
> */Jack Sprat /* wrote:
>
> I am using Axis 1.2 with XML Beans and need to get the user and
> password SOAP header elements. I've set up an Axis2 handler and
> it is being called properly.
> My question is how exactly do I get the to the SOAP header elements?
>
> Thanks.
> T
>

Shape Yahoo! in your own image. Join our Network Research Panel today! http://us.rd.yahoo.com/evt=48517/*http://surveylink.yahoo.com/gmrs/yahoo_panel_invite.asp?a=7 hot CTA = Join our Network Research Panel


Pinpoint customers who are looking for what you sell.




--
Keith Chapman
WSO2 Inc.
Oxygen for Web Services Developers.
http://wso2.org/ ------=_Part_100260_13920658.1179721009644--