Hi,
this is called dependency injection. The Axis2 runtime will call the
method and pump in the correct opContext. You'll have to grab the
needed message context when that happens so you better have some code
that assigns the needed message context to a private variable
inside that method!
Note that this method is called before your business methods so it is
safe to assume that opcontext will be presented to you before anything
else
On 5/3/06, Michele Mazzucco <[EMAIL PROTECTED]> wrote:
Hi Deepal,
could you be more explicit please? Do you mean
public void setOperationContext(OperationContext opctx) {
// empty content
}
(and I don't need to call it)?
Michele
Deepal Jayasinghe wrote:
> you have to add a method called
> setOperationContext(OperationContext opctx) {
> }
>
> in to your sevrice impl class , and that method will be called whenever
> you get a req . Using opctx you can get the messagecontext
>
>
> Michele Mazzucco wrote:
>
>> Hi all,
>>
>> how can I get the MessageContext from a OMelement?
>> (I'm using the primary interface APIs, that is my methods have the
>> following signature:
>>
>> OMelement operation(OMElement arg1, OMElelent arg2,..., OMElement argN) {
>> ...
>> }
>>
>> )
>>
>>
>>
>> Thanks,
>> Michele
>>
>>
>>
>>
>
--
Ajith Ranabahu