Writing Various Clients to Invoke Web Services
The WSO2 Application Server Client API supports writing different kinds of clients to invoke Web Services. The most suitable type of client should be selected depending on the application and the nature of the service. This sample demonstrates the following kinds of clients that can be written using the Axis2 Client API.
- Blocking Client
- Single Channel Non Blocking Client
- Dual Channel Non Blocking Client
- Dynamic Blocking Client
- RPC Client
- Fire and Forget Client
- Send Robust Client
- Operation Client
Building the sample
The sample is located in  <AS_HOME>\Samples\ClientAPI
 directory.
For more information, see Building Axis2 Samples.
This will build the ClientAPIDemoService.aar
in <AS_HOME>/repository/servicejars
directory. On the Main menu, under Services, click List. The Deployed Services page will appear with the ClientAPIDemoService service deployed.  You can view the WSDL for this service at:Â
http://<host>:<port>/services/ClientAPIDemoService?wsdl
Running the client
From the terminal go toÂ
<AS_HOME>\samples\ClientAPI
directory.Execute one of the following commands to run the client:
OS Command MS Windows run-client.bat Unix/Linux run-client.sh For more information, use
-help
 option.
When you run the script, you can select the type of client that you want to run:
- Blocking Client
- Single Channel Non Blocking Client
- Dual Channel Non Blocking Client
- Dynamic Blocking Client
- RPC Client
- Fire and Forget Client
- Send Robust Client
- Operation Client
- Exit