You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by pa...@gsk.com on 2005/08/25 14:38:56 UTC

Pl remove my subscription from this mailing list. thks.

Pawan Udernani
EIT Web Development Services
pawan.v.udernani@gsk.com
Direct: +1 919.282.3486
Gsk VoiceNet : 702-3486
FAX: +1 919-282-3564



"Eran Chinthaka" <ch...@opensource.lk> 
25-Aug-2005 08:36
Please respond to axis-dev@ws.apache.org; Please respond to 
chinthaka@opensource.lk

 
To
axis-dev@ws.apache.org
cc

Subject
Re: [Axis2] Sharing properties among MessageContexts






Interesting idea.

But what do you wanna put to the OperationContext to be shared. The 
important things it has are the message contexts of the MEP. You wanna 
create a msgCtx of the out path and put that to the operation context 
and expect that to be used after dispatching ?

-- Chinthaka

Glen Daniels wrote:

> +1
>
> You can certainly navigate up to the OperationContext and then down 
> again to the input MessageContext to get it from the output flow.
>
> But what if there really are things we want to put in the operation 
> context before we've done operation dispatch?  Would it make sense to 
> do something like the following:
>
> MessageContext {
>    OperationContext getOperationContext() {
>       if (opContext == null)
>           // No operation context yet, make a dummy so
>           // we can store things in it
>           opContext = new OperationContext();
>       return opContext;
>    }
>    ...
>    void setOperation(AxisOperation operation) {
>        // This is where operation dispatch is really happening
>        if (opContext != null) {
>            // Instead of making a new context from scratch,
>            // copy over whatever's been put into the old one first
>        }
>    }
> }
>
> ?
>
> --Glen
>
> Eran Chinthaka wrote:
>
>> Wow wow, wait.
>> Don't try to set the properties of the out message, from the IN path. 
>> You can set it, sometimes (after dispatch phase), but the best thing 
>> is to set the value to the current msgCtxt, and let the OUT handler 
>> to retrieve those info, thru operation context.
>>
>> Got it this time ??
>>
>> -Chinthaka
>>
>> Ruchith Fernando wrote:
>>
>>> But we might not have the operation context to set it since most of
>>> the time operation context will not be avilable when the inflow
>>> security handler runs, since the security IN handler (WSDoAllReceiver)
>>> is to be run in the 'PreDispatch' phase.
>>>
>>> - Ruchith
>>>
>>> On 8/25/05, Sanjiva Weerawarana <sa...@opensource.lk> wrote:
>>> 
>>>
>>>> Is it really a property which is shared across all the messages of an
>>>> operation?
>>>>
>>>> If yes, there's an obvious place to store them: operation context!
>>>> That's the reason we created operation context in the first place ..
>>>>
>>>> Sanjiva.
>>>>
>>>> On Thu, 2005-08-25 at 15:00 +0600, Ruchith Fernando wrote:
>>>> 
>>>>
>>>>> oh yeah :-)
>>>>> I will copy the parm over to the out message context in the
>>>>> WSDoAllSender when the handler is invoked.
>>>>>
>>>>> Thanks
>>>>> Ruchith
>>>>>
>>>>>
>>>>> On 8/25/05, Eran Chinthaka <ch...@opensource.lk> wrote:
>>>>> 
>>>>>
>>>>>> Please see my comments below,
>>>>>>
>>>>>> Ruchith Fernando wrote:
>>>>>>
>>>>>> 
>>>>>>
>>>>>>> Hi All,
>>>>>>>
>>>>>>> I just ran into a small issue in porting WSS4J handlers to the
>>>>>>> Axis2-WSS4J module.
>>>>>>>
>>>>>>> There are instances where the handler in the out flow 
>>>>>>> (WSDoAllSender)
>>>>>>> requires the security processing information - WSHandlerResult 
>>>>>>> vector
>>>>>>> on 
>>>>>>> org.apache.ws.security.handler.WSHandlerConstants.RECV_RESULTS key
>>>>>>>         from the message context set by the inflow handler 
>>>>>>> (WSDoAllreceiver).
>>>>>>
>>>>>>
>>>>>> 
>>>>>>
>>>>>>> In Axis 1.x, since the same MessageContext is shared for both 
>>>>>>> incoming
>>>>>>> and outgoing message it can be used to hold this information. 
>>>>>>> But in
>>>>>>> the case of Axis2, each message has its own message context and we
>>>>>>> will have to copy the properties over to the new MessageContext 
for
>>>>>>> the outgoing message.
>>>>>>>
>>>>>>> Right now such properties are copied over to the new (out flow)
>>>>>>> message context at the AbstractInOutSyncMessageReceiver and
>>>>>>> AbstractInOutAsyncMessageReceiver.
>>>>>>>
>>>>>>>
>>>>>>> 
>>>>>>
>>>>>>
>>>>>> No this is not the case in Axis2. Please don't do this in message
>>>>>> receiver. Message Receiver will only copy addressing information. 
>>>>>> Other
>>>>>> handlers will have to share information as follows.
>>>>>>
>>>>>> The correct way is this.
>>>>>> In the OUT handler,
>>>>>> 
msgCtx.getOperationContext().getMessageContext(WSDLConstants.MESSAGE_LABEL_IN). 

>>>>>>
>>>>>>
>>>>>>
>>>>>> This will return the IN message context.
>>>>>>
>>>>>> 
>>>>>>
>>>>>>> Therefore the RECV_RESULTS can be copied over using the same 
>>>>>>> mechanism.
>>>>>>>
>>>>>>> However  I will have to introduce a new constant value to the 
>>>>>>> MessageContext.
>>>>>>> RECV_RESULTS having the same value as
>>>>>>> org.apache.ws.security.handler.WSHandlerConstants
>>>>>>> Since IF I used the constant in
>>>>>>> org.apache.ws.security.handler.WSHandlerConstants as the key to 
>>>>>>> store
>>>>>>> the property in the message context it will impose the Axis2 
>>>>>>> core to
>>>>>>> depend on WSS4J !!!
>>>>>>>
>>>>>>>
>>>>>>> 
>>>>>>
>>>>>>
>>>>>> I didn't get the question. Can u elaborate a bit please.
>>>>>>
>>>>>> Regards,
>>>>>> Chinthaka
>>>>>
>




Unsubsrcibe

Posted by Bassem HAIDAR <ha...@irit.fr>.
Please unsubscribe me

Re: Unsubsrcibe

Posted by Deepal Jayasinghe <de...@opensource.lk>.
why dont you send an unsubsrcibe mail , that will automatically remove you 
from the list
Thanks,
 Deepal
................................................................
~Future is Open~



----- Original Message ----- 
From: "Arun Bhandari" <ab...@gmail.com>
To: <ax...@ws.apache.org>
Sent: Friday, August 26, 2005 7:03 PM
Subject: Unsubsrcibe


Please unsubscribe me from the mailing list!

Thanks.
Arun



Unsubsrcibe

Posted by Arun Bhandari <ab...@gmail.com>.
Please unsubscribe me from the mailing list!

Thanks.
Arun

unsubsrcibe

Posted by Rajdeep Dua <du...@yahoo.com>.


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com