axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chamikara Jayalath" <chamikar...@gmail.com>
Subject [Axis2] Allowing users to set their own replyTo value
Date Mon, 25 Sep 2006 09:30:09 GMT
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

Mime
View raw message