axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Davanum Srinivas" <dava...@gmail.com>
Subject Re: [Axis2] Allowing users to set their own replyTo value
Date Mon, 25 Sep 2006 12:44:42 GMT
Sounds like a good approach to me.

-- dims

On 9/25/06, David Illsley <davidillsley@gmail.com> wrote:
> 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 <chamikaramj@gmail.com> 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: axis-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-dev-help@ws.apache.org
>
>


-- 
Davanum Srinivas : http://www.wso2.net (Oxygen for Web Service Developers)

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


Mime
View raw message