Nishant Joshi wrote:
Hi Simon,
You have mentioned in your last mail that there is only workaround for it is
to use callaback injection... but i have already tried what you have
mentioned... and i have mentioned the exception "Both the TO and
MessageContext.TRANSPORT_OUT property are null, so nowhere to send" in my
first mail on this list...
i m still getting same error...
I have opened TUSCANY-2035 for this problem. Recent discussions in the
OASIS spec groups have clarified that the current behavior of Tuscany
for injected callback references is incorrect, and this is the cause of
the problem you are seeing.
Until this bug is fixed (hopefully soon), you won't be able to use
injected callback references in a different invocation from the original
invocation that did the injection. You should be able to work around
this problem and get your scenario working for now by making a coding
change to pass the callback target explicitly as a ServiceReference
when the client invokes the service method.
To show how this is done, I have added a new scenario to my sandbox
called callback-passing-service-reference. It takes the
callback-ws-client and callback-ws-service samples and modifies them
to add an additional parameter to the MyService interface, changing
the interface to
@Remotable
@Callback(MyServiceCallback.class)
public interface MyService {
@OneWay
void someMethod(String arg, ServiceReference<MyServiceCallback> callback);
}
The ServiceReference passed is resolved on the client side to refer to
the desired callback destination. With this change, your scenario
should work on Tuscany SCA 1.1.
Simon
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]