Hi Gopal;

we have implemented that proposal in Axis2 RC1 :) , so init method which
take message context does not support any more. So you have to add the
setOperationContext(OperationContext opctx) , and get the message
context (opctx.getMessageContext(WSDLConstants.MESSAGE_LABEL_IN_VALUE)).

public void setOperationContext(OperationContext opctx){

this.msgContext = opctx.getMessageContext(WSDLConstants.MESSAGE_LABEL_IN_VALUE);
}



Gopal Patwa wrote:

>I  am wondering does below propose from Deepal change is included in axis2
>1.0 RC1. 
>
>I had init method in my service implementation class to get access SOAP
>header from MessageContext to read ws-addressing information but after
>migrating to 1.0RC1 my msgContext is always null, does this method still
>support or there is method signature change.
>
> public void init(MessageContext msgContext) {
>        this.msgContext = msgContext;
>    }
>
>===============================================
>
>Previous mail from Deepal, I am posting this message for reference couldn't
>find the thread .
>
>Hi all;
>
>To support the scenario describe by the JIRA
>http://issues.apache.org/jira/browse/AXIS2-341 , it is require to do
>small changes into service implementation class.
>
>   In the current code base in order to get access to message context he
>has to add init method , and if the init method is present , it will
>call for each and every invocation. (init method can take one message
>context or two message context). I propose to change that to get
>operation context instead of message context and rename method to  
>    setOperationContext(OperationContext opctx);
>
>
>When the session get start up , the init() method of the service class
>will be called (using reflection) if it is present. And method will be
>given the serviceContext corresponds to that service.
>
>    init(ServiceContext serviceCtx)
>
>When the session get invalidate destroy method of the service impl class
>will be called if it present giving ServiceContext as argument.
>
>  destroy(ServiceContext serviceCtx);
>
>  
>

-- 
Thanks,
Deepal
................................................................
~Future is Open~ 


Reply via email to