Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents

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

...

The steps are as follows:

...

2. In a command prompt, switch to the sample directory:

...

sample

The sample is located in  <AS_HOME>\samplesSamples\ClientAPI directory.

3. From there, type ant For more information, see Building Axis2 Samples.

This will build the ClientAPIDemoService.aar in <AS_HOME>/repository/servicejars directory. If you start the Application Server and login to the AS Management Console, the deployed ClientAPIDemoService will be listed in the "Deployed Services" window. You 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

 

  1. From the terminal go to <AS_HOME>\samples\

...

  1. ClientAPI directory.

  2. Execute one of the following commands to run the client:

    OSCommand
    MS Windowsrun-client.

...

  1. bat
    Unix/Linuxrun-client.

...

  1. sh

    For more information, use

...

  1. -help

...

  1.  option.

When you run the script, you can select the type of client that you want to run.:

  1. Blocking Client
  2. Single Channel Non Blocking Client
  3. Dual Channel Non Blocking Client
  4. Dynamic Blocking Client
  5. RPC Client
  6. Fire and Forget Client
  7. Send Robust Client
  8. Operation Client
  9. Exit