Hi,

Do we have dedicated invocation chains for callback? If so, we can try to see if we can add databinding interceptors for the callback path. I'll have to check the code.

Thanks,
Raymond

----- Original Message ----- From: "Ignacio Silva-Lepe" <[EMAIL PROTECTED]>
To: "Tuscany Dev" <tuscany-dev@ws.apache.org>
Cc: "Ariadna Silva-Lepe" <[EMAIL PROTECTED]>
Sent: Friday, September 29, 2006 8:55 AM
Subject: Axis2ReferenceCallback


Raymond,

It seems to me something go lost in the translation of Axis2ReferenceCallback from before to after the databinding framework, or at a minimum it did not get translated correctly.

As originally written, Axis2ReferenceCallback is the object that is given to the Axis2 operation client as its callback object. As such, it receives an AsyncResult containing an Axis2 MessageContext. Originally, and following the pattern of Axis2TargetInvoker, it asked the databinding to translate the contents of the MessageContext (assumed to be an OMElement), which it then handed to the Axis2ReferenceCallbackTargetInvoker. This latter object assumes the OMElement has been translated and invokes its target via its parent PojoTargetInvoker. The target here being the Axis2Reference itself, so the invocation merely calls the callback invocation handler on the Axis2Reference's inbound wire.

As it stands now, all Axis2ReferenceCallback does is take the OMElement and hand it to the Axis2ReferenceCallbackTargetInvoker, the translation code is gone, presumably factored out into the databinding interceptor. However, there does not seem to be any such intervening interceptor. From here on nothing has changed, so the Axis2ReferenceCallbackTargetInvoker still assumes that the OMElement has been translated.

Notice that since originally the Axis2Reference had no outbound wire, the Axis2ReferenceCallbackTargetInvoker did not have a chain preceding it. In fact, Axis2ReferenceCallbackTargetInvoker would not even exist did it not have to extend the behavior of o.a.axis2.client.async.Callback and do something very similar to what PojoTargetInvoker does to trigger the Axis2Reference's inbound wire callback invocation handler. Since it can't extend two classes, it seemed to make sense to make it a target invoker but the intention was not to have it be part of an outbound wire that did not exist.

Now that there is an outbound wire, it seems like what needs to happen is as follows:
1- Axis2ReferenceCallback is called by the Axis2 operation client
2- (Some magic happens here) Axis2ReferenceCallback somehow triggers the outbound wire's inbound chain of interceptors, which hopefully can include a databinding interceptor. Not sure how to set this up 3- Axis2ReferenceCallbackTargetInvoker sits at the end of the chain and gets invoked with a translated OMElement. For this point on it can assume this has happened. Again, not sure how to get this set up.

Does this sound like it could work, and like what you had in mind?

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to