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 Vaibhav Arya <va...@otssolutions.com> on 2009/05/13 08:26:07 UTC
[web service client]
Hi every one,
I have created and deployed web service using axis2.
Would you please tell me how to write a simple client to call an axis2 web
service method (especially without parameter).
Kindly try to provide code snippet.
Thanks in advance.
Vaibhav Kumar Arya
===================================================================================================
Private, Confidential and Privileged. This e-mail and any files and attachments transmitted with it are confidential and/or privileged. They are intended solely for the use of the intended recipient. The content of this e-mail and any file or attachment transmitted with it may have been changed or altered without the consent of the author. If you are not the intended recipient, please note that any review, dissemination, disclosure, alteration, printing, circulation or Transmission of this e-mail and/or any file or attachment transmitted with it, is prohibited and may be unlawful. If you have received this e-mail or any file or attachment transmitted with it in error please notify OTS Solutions at info@otssolutions.com
===================================================================================================
Re: [web service client]
Posted by Chinmoy Chakraborty <cc...@gmail.com>.
You can try following url:
http://ws.apache.org/axis2/1_4_1/userguide-buildingservices.html#createscratch
You can try following code to call your service:
Options options = new Options();
Object[] invokedArgs = new Object[0];
Class[] returnType = new Class[]{Boolean.class}; // assumed return
type is boolean
RPCServiceClient client = new RPCServiceClient();
options.setTo(targetEPR);
options.setAction(OPERATION_NAME);
options.setTimeOutInMilliSeconds(600000);
client.setOptions(options);
//Blocking invocation
Object[] result = client.invokeBlocking(qName, invokedArgs,
retType);
return result[0];
Chinmoy
On Wed, May 13, 2009 at 11:56 AM, Vaibhav Arya <
vaibhav.arya@otssolutions.com> wrote:
> Hi every one,
>
>
>
> I have created and deployed web service using axis2.
>
>
>
> Would you please tell me how to write a simple client *to call an axis2
> web service* method (especially without parameter).
>
>
>
> Kindly try to provide code snippet.
>
>
>
> Thanks in advance.
>
>
>
> *Vaibhav Kumar Arya*
>
>
>
>
>
>
> ===================================================================================================
> Private, Confidential and Privileged. This e-mail and any files and
> attachments transmitted with it are confidential and/or privileged. They are
> intended solely for the use of the intended recipient. The content of this
> e-mail and any file or attachment transmitted with it may have been changed
> or altered without the consent of the author. If you are not the intended
> recipient, please note that any review, dissemination, disclosure,
> alteration, printing, circulation or Transmission of this e-mail and/or any
> file or attachment transmitted with it, is prohibited and may be unlawful.
> If you have received this e-mail or any file or attachment transmitted with
> it in error please notify OTS Solutions at info@otssolutions.com
>
> ===================================================================================================
>