My perspective is that if you're wanting to take care of the listeners
yourself then you shouldn't be using a ServiceClient.sendReceiveXXX
but should do a one-way invoke using the ServiceClient/OperationClient
with the ReplyTo that you want set.
The danger with letting users override is that if they get it wrong
things will break in strange and hard to trace ways. I'd prefer to
limit using a generated ReplyTo when using the
ServiceClient.sendReceieveXXX and document how to use a custom ReplyTo
using fireAndForget etc.
How does that sound to you?
David
On 25/09/06, Chamikara Jayalath <[EMAIL PROTECTED]> wrote:
Hi All,
I got a requirement to allow users to set their own URL for the replyTo
value in a ServiceClient 'sendReceiveNonBlocking' invocation. It seems like
following code-block in the 'execute' method of OutInAxisOperationClient
always replaces the replyTo value with its own endpoint ( i.e. the URL of
the listner started by Axis2 client).
if (options.isUseSeparateListener()) {
EndpointReference replyToFromTransport = ..........;
if (mc.getReplyTo() == null) {
mc.setReplyTo(replyToFromTransport);
} else {
mc.getReplyTo().setAddress(replyToFromTransport.getAddress());
}
}
But in my scenario, I just want to set my own ReplyTo value and I will take
care of the listners etc. So I basically want Axis2 to let my message go
without starting its listner (and without overriding the replyTo value I
set). This can be achieved with the following change.
if (options.isUseSeparateListener()) {
callbackReceiver.addCallback(mc.getMessageID(), callback);
if (mc.getReplyTo() == null) {
EndpointReference replyToFromTransport = ..........;
mc.setReplyTo(replyToFromTransport);
}
}
This seems like a general requirement for me. What do u all think ?
Chamikara
--
David Illsley - IBM Web Services Development
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]