You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@axis.apache.org by Dai-Hee Kim <m7...@gmail.com> on 2009/08/06 19:11:21 UTC

One-way call using Axis2/C

Hello, everybody

I am trying to use One-way method using Axis2/C.
Therefore, I used, first, java2wsdl.sh to generate WSDL from void oneway()
method in java  and used WSDL2C.sh to generate skeleton codes on server side
and stub codes on client side
Moreover, I checked that this oneway method(service) was registered as
in-only message type in service.xml on server side
this oneway service supposed to just do sleep(10) and print "It's done"
however, when I run client which just invoked oneway method, this client
application was terminated after server had printed "It's done"
It means that it is not oneway (IN-ONLY), it is IN-OUT method
I modified some lines in generated stub codes on client side like below

(1) changing from axis2_svc_client_send_robust() to
axis2_svc_client_file_and_forget()
(2) changing from axis2_op_set_msg_exchange_pattern(op, env,
AXIS2_MEP_URI_OUT_ONLY); to axis2_op_set_msg_exchange_pattern(op, env,
AXIS2_MEP_URI_IN_ONLY);

but, the result was the same.

Is there any one who can use one-way using Axis2/C and help me to do this?
I really appreciate your concern and help

Thank you

Re: One-way call using Axis2/C

Posted by Dimuthu Gamage <di...@gmail.com>.
HI,
axis2_svc_client_send_robust() - Client will wait for the server to know the
status for the call. (failure or success)
axis2_svc_client_fire_and_forget() - Meant to immediately return after a
request.

So just change this method and it should work.

Thanks
Dimuthu

On Thu, Aug 6, 2009 at 10:41 PM, Dai-Hee Kim <m7...@gmail.com> wrote:

> Hello, everybody
>
> I am trying to use One-way method using Axis2/C.
> Therefore, I used, first, java2wsdl.sh to generate WSDL from void oneway()
> method in java  and used WSDL2C.sh to generate skeleton codes on server side
> and stub codes on client side
> Moreover, I checked that this oneway method(service) was registered as
> in-only message type in service.xml on server side
> this oneway service supposed to just do sleep(10) and print "It's done"
> however, when I run client which just invoked oneway method, this client
> application was terminated after server had printed "It's done"
> It means that it is not oneway (IN-ONLY), it is IN-OUT method
> I modified some lines in generated stub codes on client side like below
>
> (1) changing from axis2_svc_client_send_robust() to
> axis2_svc_client_file_and_forget()
> (2) changing from axis2_op_set_msg_exchange_pattern(op, env,
> AXIS2_MEP_URI_OUT_ONLY); to axis2_op_set_msg_exchange_pattern(op, env,
> AXIS2_MEP_URI_IN_ONLY);
>
> but, the result was the same.
>
> Is there any one who can use one-way using Axis2/C and help me to do this?
> I really appreciate your concern and help
>
> Thank you
>
>
>
>


-- 
Thanks,
Dimuthu Gamage

http://www.dimuthu.org
http://www.wso2.org