Thanks Charitha.
Actually, I had read the earlier discussion regarding this topic. (http://marc.info/?l=axis-user&m=116492371225455&w=2) And I thought by now the following should be working. >>A stub uses an operation client inside each method. The life of the >>operation client is thus equal to the life of that method call. An >>option would be to add a method to ServiceClient() to get the "last" >>used operation client. Then one could get the last operation client, >>get the appropriate message context from that and grab whatever info >>needed. >>We could implement this fairly trivially by making operationClient an >>instance variable of ServiceClient and updating that whenever a new one >>is created. ServiceClient is already declared to be not thread safe so >>this should work ok (I think). >> Sanjiva Kamal -----Original Message----- From: Charitha Kankanamge [mailto:[EMAIL PROTECTED] Sent: Monday, April 02, 2007 11:06 PM To: axis-user@ws.apache.org Subject: Re: soap header in stub Hi Kang, AFAIK you won't be able to retrieve SOAP headers using serviceClient. Because, with service clients you can only access SOAP body or the pay load. Though you can add SOAP headers, you do not have a way to retrieve SOAP header from service client. Have a look at http://www-128.ibm.com/developerworks/webservices/library/ws-soa-axis2-1 / for more information on this. You can use operationClient to retrieve the SOAP headers. See http://wso2.org/library/290 Also, the same topic was discussed in the following url. http://marc.info/?l=axis-user&m=116492371225455&w=2 regards Charitha Kang, Kamaljeet K. wrote: >Hi, > >I am trying to retrieve soap header of the response from stub using >serviceClient.getLastOperationContext() but OperationContext is always >null. > >Is this the right way to retrieve soap header in stub? > >Thanks > >Kamal >============================================================ >The information contained in this message may be privileged >and confidential and protected from disclosure. If the reader >of this message is not the intended recipient, or an employee >or agent responsible for delivering this message to the >intended recipient, you are hereby notified that any reproduction, >dissemination or distribution of this communication is strictly >prohibited. If you have received this communication in error, >please notify us immediately by replying to the message and >deleting it from your computer. Thank you. Tellabs >============================================================ > >--------------------------------------------------------------------- >To unsubscribe, e-mail: [EMAIL PROTECTED] >For additional commands, e-mail: [EMAIL PROTECTED] > > > > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] ============================================================ The information contained in this message may be privileged and confidential and protected from disclosure. If the reader of this message is not the intended recipient, or an employee or agent responsible for delivering this message to the intended recipient, you are hereby notified that any reproduction, dissemination or distribution of this communication is strictly prohibited. If you have received this communication in error, please notify us immediately by replying to the message and deleting it from your computer. Thank you. Tellabs ============================================================ --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]