Hi, I am trying to add SOAP header in outbound messages in the skeleton impl class. I auto-generated code from wsdl and I am using ADB binding.
I tried the following suggestion but I am getting null pointer at outMessageContext.getEnvelope(). It looks like envelope is added later on in MessageReceiverInOut class. Any other suggestion? Thanks Kamal -----Original Message----- From: Thilina Gunarathne [mailto:[EMAIL PROTECTED] Sent: Sunday, February 25, 2007 1:22 PM To: [email protected] Subject: Re: setOperationContext Try the following, MessageContext inMessageContext = MessageContext.getCurrentMessageContext(); OperationContext operationContext = inMessageContext.getOperationContext(); MessageContext outMessageContext = operationContext .getMessageContext(WSDLConstants.MESSAGE_LABEL_OUT_VALUE); outMessageContext.getEnvelope().getHeader().addHeaderBlock("xxx",namespa ce); Thanks, Thilina On 2/24/07, Kang, Kamaljeet K. <[EMAIL PROTECTED]> wrote: > Thanks. It works. > Another question, how do set the response soap header? > > kamal > > -----Original Message----- > From: Deepal Jayasinghe [mailto:[EMAIL PROTECTED] > Sent: Friday, February 23, 2007 10:13 AM > To: [email protected] > Subject: Re: setOperationContext > > Hi Michele; > Yes we are store that in ThreadLocal. > > Thanks > Deepal > > >Those info should be stored into a ThreadLocal (tomcat uses a new > thread > >for each received request). > > > >Michele > > > >On Fri, 2007-02-23 at 09:46 -0500, Punnoose, Roshan wrote: > > > > > >>If this is a static method, how can multiple requests to one service > >>work? Just wondering, how I could access the MessageId for different > >>requests to the same service. Thanks! > >> > >>Roshan Punnoose > >>Phone: 301-497-6039 > >>-----Original Message----- > >>From: Davanum Srinivas [mailto:[EMAIL PROTECTED] > >>Sent: Thursday, February 22, 2007 11:06 PM > >>To: [email protected] > >>Subject: Re: setOperationContext > >> > >>That's outdated!. please use MessageContext.getCurrentContext() from > >>inside your service method (when Axis2 calls your service method.) > >> > >>thanks, > >>dims > >> > >>On 2/22/07, Kang, Kamaljeet K. <[EMAIL PROTECTED]> wrote: > >> > >> > >>>Hi, > >>> > >>>I would like to access service context on the skeleton side. I > >>> > >>> > >>followed > >> > >> > >>>the documentation ("http://wso2.org/library/259") and added > >>>'setOperationContext(OperationContext opCtxt)' in the skeleton class > >>> > >>> > >>but > >> > >> > >>>the method is never called. Is this the correct way to access Context > >>> > >>> > >>on > >> > >> > >>>the server side? > >>> > >>> > >>>Thanks > >>> > >>>Kamal Kang > >>> > >>>============================================================ > >>>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] > >> > >> > > > > > >--------------------------------------------------------------------- > >To unsubscribe, e-mail: [EMAIL PROTECTED] > >For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > > > > > -- > Thanks, > Deepal > ................................................................ > "The highest tower is built one brick at a time" > > > > --------------------------------------------------------------------- > 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] > > -- Thilina Gunarathne WSO2, Inc.; http://www.wso2.com/ Home page: http://webservices.apache.org/~thilina/ Blog: http://thilinag.blogspot.com/ --------------------------------------------------------------------- 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]
