You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Rishi krish <ri...@gmail.com> on 2007/03/01 17:05:22 UTC

Re: sendReceive and sendRobust

Hi Keith/Depal
I had read that article and I beleive still I have few questions on this:

Whats an "in-only operation" - is it mapping to an operation like void
test(OMElement om) on the Service? I tried that operation type with
sendReceive and it worked [the service was also deployed in axis2 with
RawXMLInOut....] - so when you say

"sendReceive has designed to invoke
in-out it is not recommended to use that to invoke in-only operation and
if you do so you will get exception as well,"

I didnt get an exception - so do you say that I should not use sendReceive
as not getting exception is a bug??

Ideally I would like to ask this question -
I have a service which has on operation
public OMElement test(OMElement)

This method might return null for some cases of invocation. But I just didnt
want to have 2 separate methods one return void and another return
OMElement. So there is just one method [as above].

Now I have deployed this service in Axis2 and associated the operation with
RawXMLInOutReceive...

Now starts the client part:
I am using only sendReceive and tested both the cases of null return and non
null return on that service and everything works fine.

Is this right? or you think this is a bug and I am just lucky to get it
working?

thanks
Anamitra




On 2/27/07, keith chapman <ke...@gmail.com> wrote:
>
> This might help too
>
> http://wso2.org/library/290
>
> Thanks,
> Keith
>
> On 2/28/07, Rishi krish < rishikrrish@gmail.com> wrote:
> >
> > Hi All
> >
> > I am confused abt the usage of these 2 methods in the ServiceClient
> > class. As per the axis2 doc - we should use sendRobust if we are not needing
> > the response but care abt the fault and we should use sendReceive if we care
> > abt the reponse and fault. Does it mean that calling sendReceive should work
> > in both cases?
> >
> > Case 1> The web service operation I am calling has no response [service
> > method has java void as return type]
> > Case 2>The web service operation has declared [service method has
> > OMElement as return type] response but
> >        Case2 a>for an invocation of that method it returns null
> >        Case2 b>for another invocation it return data.
> >
> > I am testing my application with these above cases [and subcases] and
> > its working with sendReceive in client. In that case I am not clear whats
> > the use of having sendRobust ?? It seems using sendReceive will be enough
> > for handling all the cases - right?
> >
> > I am writing my own DII Web Service Client using the ServiceClient api.
> > Unless really needed I want to use sendReceive and fireAndForget [for
> > oneway]. Can anyone point me if I am not getting this right.
> >
> >
> > --
> > thanks
> > Rishi
> >
>
>
>
> --
> Keith Chapman
> WSO2 Inc.
> Oxygen for Web Services Developers.
> http://wso2.org/




-- 
thanks
Rishi