Return-Path: Delivered-To: apmail-ws-axis-user-archive@www.apache.org Received: (qmail 80311 invoked from network); 12 Jun 2007 06:57:23 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 12 Jun 2007 06:57:23 -0000 Received: (qmail 30355 invoked by uid 500); 12 Jun 2007 06:57:20 -0000 Delivered-To: apmail-ws-axis-user-archive@ws.apache.org Received: (qmail 29376 invoked by uid 500); 12 Jun 2007 06:57:18 -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 29364 invoked by uid 99); 12 Jun 2007 06:57:18 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 11 Jun 2007 23:57:18 -0700 X-ASF-Spam-Status: No, hits=0.6 required=10.0 tests=NO_REAL_NAME X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: local policy) Received: from [88.217.195.101] (HELO mucmvw4.HypoVereinsbank.DE) (88.217.195.101) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 11 Jun 2007 23:57:14 -0700 Received: from mucmvw4.HypoVereinsbank.DE (localhost [127.0.0.1]) by localhost.HypoVereinsbank.DE (HVBMail) with ESMTP id 765BAB76BF for ; Tue, 12 Jun 2007 06:52:04 +0000 (GMT) Received: from mucmxi2.hypovereinsbank.de (mucmxi2 [192.168.254.174]) by mucmvw4.HypoVereinsbank.DE (HVBMail) with ESMTP id 66444B7485 for ; Tue, 12 Jun 2007 06:52:04 +0000 (GMT) Received: from mailgateway3.hypovereinsbank.de (mailgateway3 [172.207.11.77]) by mucmxi2.hypovereinsbank.de (HVBMail) with ESMTP id 81EFF473C3 for ; Tue, 12 Jun 2007 06:56:59 +0000 (GMT) Received: from EXMECA54.resdom.droot.net (unknown [10.58.24.36]) by mailgateway3.hypovereinsbank.de (HVBMail) with ESMTP id 449B7160002 for ; Tue, 12 Jun 2007 06:56:52 +0000 (GMT) Received: from EXMECAB4.resdom.droot.net ([10.58.24.60]) by EXMECA54.resdom.droot.net with Microsoft SMTPSVC(6.0.3790.1830); Tue, 12 Jun 2007 08:56:52 +0200 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-MimeOLE: Produced By Microsoft Exchange V6.5 Subject: AW: How to retrieve SOAP Header in Axis2 Date: Tue, 12 Jun 2007 08:56:51 +0200 Message-ID: <4F96C437AA0FB545B7F4E20C8CEB1B0A015183EA@EXMECAB4.resdom.droot.net> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: How to retrieve SOAP Header in Axis2 Thread-Index: Acesj8MHiVUwFULlQtGYiyCfmvq0kAALsZMA From: To: X-OriginalArrivalTime: 12 Jun 2007 06:56:52.0103 (UTC) FILETIME=[DAFB8970:01C7ACBE] X-Virus-Checked: Checked by ClamAV on apache.org Try the following: org.apache.axiom.soap.SOAPHeader header =3D = org.apache.axis2.context.MessageContext .getCurrentMessageContext().getEnvelope().getHeader(); The getCurrentMessageContext Method is static so you can access the = MessageContext from nearly everywhere within the message processing = flow. if you want to receive a dedicated header element you might want to use: OMElement headerElem =3D header.getFirstChildWithName(new QName( "http://yourname.space", "YourTag")); Falko-Germar Schwarz (IBM) HIS16ES=20 =20 im Auftrage der=20 HVB Information Services GmbH Am Tucherpark 12 D-80538 M=FCnchen =20 phone +49 89 378-22001 mobil +49 0170 79 37 26 1 postal address Am Tucherpark 12, D-80538 M=FCnchen mailto:Falko-Germar.Schwarz.extern@HVBIS.com http://www.hvbis.com/ mailto:falkoschwarz@de.ibm.com http://www.ibm.com/ HVB Information Services GmbH Member of UniCredit Group, Am Tucherpark = 12, 80538 M=FCnchen=20 Management: Gabriele Ruf, Klaus Rausch=20 Chairman Supervisory Board: Matthias Sohler=20 Legal form: GmbH, Registered Office: Munich, Register Court: Local = Court Munich HR B 93804, Tax Number 143/102/30511 Important Note: This e-mail is only intended for the person or = company/organisation named as recipient. It may contain trade secrets or = undisclosed and confidential information or information otherwise = protected by work-product immunity or other legal regulations. If you = have received this email by mistake, we kindly ask you not to copy this = message or use it for any purpose nor disclose its contents to any other = person. Please inform us immediately and delete the original document. = In addition, please let us know if you or your company object to = receiving e-mails for messages of this kind.=20 -----Urspr=FCngliche Nachricht----- Von: shirene [mailto:tracy_yau@hotmail.com]=20 Gesendet: Dienstag, 12. Juni 2007 03:19 An: axis-user@ws.apache.org Betreff: Re: How to retrieve SOAP Header in Axis2 how to get msgContext? do u hv any sample to share? Jack Sprat wrote: >=20 > Try the following to access the SOAP header: >=20 > SOAPEnvelope env =3D msgContext.getEnvelope(); >=20 > Regards, > T >=20 >=20 > shirene wrote: > Hi, > Did anyone can help me on how to retrieve the soap header in axis2?=20 > Below is my service.xml file details: >=20 >=20 > =20 >=20 > locked=3D"false">ReceiverService >=20 > =20 > =20 > class=3D"org.apache.axis2.receivers.RawXMLINOutMessageReceiver"/> > urn:soapRec > =20 >=20 >=20 > if i use OMElement as incoming parameter, my web service is working=20 > but i not able to retrieve the soap header. public OMElement=20 > soapRec(OMElement element) {} >=20 > In order to retrieve the soap header, i change the function to below > method:- > public void soapRec(SOAPEnvelope req, SOAPEnvelope resp){} >=20 > but i get this error when i call the web service:- >=20 >=20 > xmlns:soapenv=3D"http://schemas.xmlsoap.org/soap/envelope/"> > />soapenv:ClientRaw > Xml provider supports only the methods bearing the signature public=20 > OMElement <method-name>(OMElement) where the method name can be=20 > anythingorg.apache.axis2.AxisFault: Raw Xml provider supports only the = > methods bearing the signature public OMElement=20 > <method-name>(OMElement) where the method name can be anything > at > = org.apache.axis2.receivers.RawXMLINOutMessageReceiver.invokeBusinessLogic= (RawXMLINOutMessageReceiver.java:95)=20 > at > = org.apache.axis2.receivers.AbstractInOutSyncMessageReceiver.receive(Abstr= actInOutSyncMessageReceiver.java:37)=20 > at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:454)=20 > at > = org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest= (HTTPTransportUtils.java:284)=20 > at > = org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:136) = > at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)=20 > at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)=20 > at > = org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applicat= ionFilterChain.java:252)=20 >=20 >=20 > Is that cos by the invalid "messageReceiver" type? if yes, what shld i = > change it to? >=20 >=20 >=20 >=20 >=20 >=20 >=20 > =20 > --------------------------------- > Choose the right car based on your needs. Check out Yahoo! Autos new=20 > Car Finder tool. >=20 --=20 View this message in context: = http://www.nabble.com/How-to-retrieve-SOAP-Header-in-Axis2-tf3900058.html= #a11071500 Sent from the Axis - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org For additional commands, e-mail: axis-user-help@ws.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org For additional commands, e-mail: axis-user-help@ws.apache.org