axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shaoguang Cong <>
Subject Re: how to get soap header from stub in axis2
Date Mon, 04 Dec 2006 15:52:29 GMT
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?
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?

  On 12/1/06, hoy hoy <> wrote:   I know how to add headers, via:


however, after the call is made; 


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! 


  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:] 
Sent: Thursday, November 30, 2006 1:55 PM 
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? 


Everyone is raving about the all-new Yahoo! Mail beta.
View raw message