Return-Path: Delivered-To: apmail-ws-axis-user-archive@www.apache.org Received: (qmail 74481 invoked from network); 4 Dec 2006 15:53:05 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 4 Dec 2006 15:53:05 -0000 Received: (qmail 54764 invoked by uid 500); 4 Dec 2006 15:53:03 -0000 Delivered-To: apmail-ws-axis-user-archive@ws.apache.org Received: (qmail 54744 invoked by uid 500); 4 Dec 2006 15:53:03 -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 54733 invoked by uid 99); 4 Dec 2006 15:53:03 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 04 Dec 2006 07:53:03 -0800 X-ASF-Spam-Status: No, hits=4.8 required=10.0 tests=DNS_FROM_RFC_ABUSE,DNS_FROM_RFC_POST,DNS_FROM_RFC_WHOIS,HTML_MESSAGE X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: local policy) Received: from [209.191.85.129] (HELO web37210.mail.mud.yahoo.com) (209.191.85.129) by apache.org (qpsmtpd/0.29) with SMTP; Mon, 04 Dec 2006 07:52:51 -0800 Received: (qmail 82736 invoked by uid 60001); 4 Dec 2006 15:52:29 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding:Message-ID; b=z2AuTNeGbJ8aqm7b0KeahJOqw4jQMOwLA5MHHo4yUlCYrzLAgZj+1kAun64LbpM/1bH/5YHcnlq9GZ1RscVxFTYFoD/mdKI07bBAFmmEp6MR+Lwu3Jrttg7MPSkRZqPiFkzbpB2nrDlK3ms4C0UsXQsa4F0xs98AikQGvX1SsME=; X-YMail-OSG: I1gl4uYVM1lAE48Qvz4be4zzbyl4zsBhMVBz8yOs6tYfXfCX254Nc4x2WotS887oKXQCDI8Nxtf95EkGTuosfBv6WVsmk9ldqD8iio8M35wb5fQgy_ghIKb38ngOq3_i4HPy4XV2uIKX28I- Received: from [198.203.175.175] by web37210.mail.mud.yahoo.com via HTTP; Mon, 04 Dec 2006 07:52:29 PST Date: Mon, 4 Dec 2006 07:52:29 -0800 (PST) From: Shaoguang Cong Subject: Re: how to get soap header from stub in axis2 To: axis-user@ws.apache.org In-Reply-To: <4e15bfa30612021212v548914d1kf4c2c81a1011b4d1@mail.gmail.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="0-1187090576-1165247549=:82385" Content-Transfer-Encoding: 8bit Message-ID: <846991.82385.qm@web37210.mail.mud.yahoo.com> X-Virus-Checked: Checked by ClamAV on apache.org --0-1187090576-1165247549=:82385 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Deepal Jayasinghe has a paper mentioned that. http://www-128.ibm.com/developerworks/webservices/library/ws-soa-axis2-1/ "With service clients you can only access SOAP body or the pay load. Of course you can add SOAP headers but you do not have a way to retrieve SOAP header from service client. For that you will need to use an operation client." The problem is that the generated stub doesn't give a way to access the operation client. So from the client stub, one seems cannot get access to the operation client, messageContext or SOAPHeader. Anybody knows if there's a way to get such info from client handler? Shaoguang Jatinder Kaur wrote: I am also looking to do the same -- basically, the Stub is just returning the SOAP Body. I would also like to retrieve SOAP Headers without having to modify the stub (generated) code. Is there any way to do this? Thanks, Jatinder On 12/1/06, hoy hoy wrote: I know how to add headers, via: stub._getServiceClient().addStringHeader(...) however, after the call is made; stub.MyMethodToInvoke(...) I want to view the soap headers that are returned. Using ethereal (network sniffer) I can see the headers, but they are not exposed on the stub class. There are no, stub.getHeader (...) methods that I can use, unless I need to do something fancier? How do I get the SOAPEnvelope from a Stub? Eseentially, the stub is all I'm working with or do I need to look elsewhere? Thanks so much for your help Brennan! Hoy On 11/30/06, Brennan Spies wrote: The SOAPEnvelope (which you create on the client or receive from the service) has a getHeader() method for getting the SOAPHeader axiom class that has the appropriate methods. The ServiceClient (class member in the Stub) also has helper methods for adding SOAP headers. --------------------------------- From: hoy hoy [mailto: liveforhim@gmail.com] Sent: Thursday, November 30, 2006 1:55 PM To: axis-user@ws.apache.org Subject: how to get soap header from stub in axis2 Hi all, I'm using Axis 2 1.1 and have a stub that was generated from a WSDL. The soap call that I'm making returns SOAP headers, namely session information. How can I retrieve those SOAP headers from my stub? What methods or helper classes do I need to use? Thanks, Hoy --------------------------------- Everyone is raving about the all-new Yahoo! Mail beta. --0-1187090576-1165247549=:82385 Content-Type: text/html; charset=iso-8859-1 Content-Transfer-Encoding: 8bit
Deepal Jayasinghe has a paper mentioned that.
"With service clients you can only access SOAP body or the pay load. Of course you can add SOAP headers but you do not have a way to retrieve SOAP header from service client. For that you will need to use an operation client."
The problem is that the generated stub doesn't give a way to access the operation client.
So from the client stub, one seems cannot get access to the operation client, messageContext or SOAPHeader. Anybody knows if there's a way to get such info from client handler?
 
Shaoguang

Jatinder Kaur <jatinder.kaur@gmail.com> wrote:
I am also looking to do the same -- basically, the Stub is just returning the SOAP Body. I would also like to retrieve SOAP Headers without having to modify the stub (generated) code.
 
Is there any way to do this?
 
Thanks,
Jatinder

 
On 12/1/06, hoy hoy <liveforhim@gmail.com> wrote:
I know how to add headers, via:

stub._getServiceClient().addStringHeader(...)

however, after the call is made;

stub.MyMethodToInvoke(...)

I want to view the soap headers that are returned.  Using ethereal (network sniffer) I can see the headers, but they are not exposed on the stub class.  There are no, stub.getHeader (...) methods that I can use, unless I need to do something fancier?

How do I get the SOAPEnvelope from a Stub?  Eseentially, the stub is all I'm working with or do I need to look elsewhere?

Thanks so much for your help Brennan!

Hoy


On 11/30/06, Brennan Spies <brennanspies@sbcglobal.net > wrote:
The SOAPEnvelope (which you create on the client or receive from the service) has a getHeader() method for getting the SOAPHeader axiom class that has the appropriate methods. The ServiceClient (class member in the Stub) also has helper methods for adding SOAP headers.
 

From: hoy hoy [mailto: liveforhim@gmail.com]
Sent: Thursday, November 30, 2006 1:55 PM
To: axis-user@ws.apache.org
Subject: how to get soap header from stub in axis2
 
Hi all,

I'm using Axis 2 1.1 and have a stub that was generated from a WSDL.  The soap call that I'm making returns SOAP headers, namely session information.  How can I retrieve those SOAP headers from my stub?  What methods or helper classes do I need to use?

Thanks,
Hoy




Everyone is raving about the all-new Yahoo! Mail beta. --0-1187090576-1165247549=:82385--