Return-Path: Delivered-To: apmail-ws-axis-dev-archive@www.apache.org Received: (qmail 73469 invoked from network); 13 Oct 2005 23:49:51 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 13 Oct 2005 23:49:51 -0000 Received: (qmail 43015 invoked by uid 500); 13 Oct 2005 23:49:39 -0000 Delivered-To: apmail-ws-axis-dev-archive@ws.apache.org Received: (qmail 42986 invoked by uid 500); 13 Oct 2005 23:49:39 -0000 Mailing-List: contact axis-dev-help@ws.apache.org; run by ezmlm Precedence: bulk Reply-To: axis-dev@ws.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list axis-dev@ws.apache.org Received: (qmail 42975 invoked by uid 99); 13 Oct 2005 23:49:39 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 13 Oct 2005 16:49:39 -0700 X-ASF-Spam-Status: No, hits=1.4 required=10.0 tests=DNS_FROM_RFC_ABUSE,DNS_FROM_RFC_WHOIS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [216.104.212.90] (HELO p01mgw01.macromedia.com) (216.104.212.90) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 13 Oct 2005 16:49:41 -0700 Received: from P01EXF01.macromedia.com (p01exf01.macromedia.com [10.176.24.139]) by p01mgw01.macromedia.com (Switch-3.1.7/Switch-3.1.7) with ESMTP id j9DNnH3B010063; Thu, 13 Oct 2005 16:49:17 -0700 (PDT) Received: from p02exm01.macromedia.com ([10.60.48.130]) by P01EXF01.macromedia.com with Microsoft SMTPSVC(6.0.3790.211); Thu, 13 Oct 2005 16:48:55 -0700 X-MimeOLE: Produced By Microsoft Exchange V6.5.7226.0 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: quoted-printable Subject: RE: [Axis2] How to set SOAP Header ? Date: Thu, 13 Oct 2005 19:49:56 -0400 Message-ID: <39A72E1EBF03EB44AACFD8036D1489F9017FA85D@p02exm01.macromedia.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: [Axis2] How to set SOAP Header ? Thread-Index: AcXPm0zPbZM7JpckQ2mnOg+aEXL87QAnsfXwAAWhLoA= From: "Tom Jordahl" To: , X-OriginalArrivalTime: 13 Oct 2005 23:48:55.0293 (UTC) FILETIME=[AC14C2D0:01C5D050] X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Sure seems like this is a good place for a setHeader() convenience method! Let not make the AXIOM/Axis2 API hard to use just for purity sake.... -- Tom Jordahl -----Original Message----- From: Chris Lintz [mailto:chris.lintz@vegas.com]=20 Sent: Thursday, October 13, 2005 5:11 PM To: axis-dev@ws.apache.org; chinthaka@opensource.lk Subject: RE: [Axis2] How to set SOAP Header ? Thanks for the info. That was close to working for me, but it appears that way creates just an envelope wihtout the body (atleast errors related to that were created). Here is what I did to create header elements that finally worked: =20 OMFactory factory =3D OMAbstractFactory.getOMFactory(); OMNamespace ns1 =3D factory.createOMNamespace("http://mynamespace",""); OMElement clientKeyElement =3D factory.createOMElement("clientKey",ns1); clientKeyElement.setText( CLIENT_KEY ); env.getHeader().addChild( clientKeyElement ); -----Original Message----- From: Eran Chinthaka [mailto:chinthaka@opensource.lk]=20 Sent: Wednesday, October 12, 2005 7:10 PM To: axis-dev@ws.apache.org Subject: Re: [Axis2] How to set SOAP Header ? Hi "Local-Underground" , Axis2 has its "native" xml object model called Axiom. We represent the SOAP message using that. Every SOAP element extends from OMElement. So if you want to set a header the easiest way is like this: SOAPFactory fac =3D OMAbstractFactory.getSOAP11Factory(); // or getSOAP12Factory() SOAPEnvelope =3D fac.getDefaultSOAPEnvelope(); // this contains Envelope, Header and the Body soap12Envelope.getHeader().addHeaderBlock("Your Header Name", OMNamespace) If you want more info on AXIOM, read the OM (AXIOM is also referred to as OM within Axis2 dev team) tutorial found in Axis2 site, or there will be couple of other tutorials on the web. -- Chinthaka local-underground wrote: >Hi, >I am trying to figure out what has changed in terms of how I can now=20 >set a SOAP Header in Axis2. Does any one know how to do so? > > Here is my envelope: env =3D createEnvelope(); > >But there is no setHeader(String, String) function. I can get the=20 >header, but its not apparent how to successfully set a header. > >thanks for any help > > > > =09 >__________________________________ >Start your day with Yahoo! - Make it your home page!=20 >http://www.yahoo.com/r/hs > > > =20 >