Deploying POJO Services

The POJO services component allows you to upload POJOs and expose them as Web services. All you have to do is locate your compiled .class file that you want to add your POJO service, and upload it.

Uploading a POJO Service

Figure 1: Uploading a POJO service file

  1. In the navigator, under Manage/Service, click POJO Services.
  2. Click Browse to locate the file you want to upload.
  3. Click Upload.
  4. The Deployed Services page appears.Subsequently, if the service is successful, it will appear in the Service Groups table. If the service is faulty, a Faulty Service Groups link will appear. You can click the link to view the errors.
Limitations

Testing the Service

You can easily verify your service with the WSO2 WSAS. Several options are availableto test your service

Figure 2: Service dashboard

  1. In the navigator, under Manage/Service, click List. The Deployed Services page appears.
  2. Click on the service name you want to test. The Service Dashboard page appears.
  3. Click Try the service on the Client Operations panel. A page with your service name appears. It contains the operations available for your service.
  4. Give the parameters for the operations you want to invoke.
  5. Click the button at the bottom of the window. This button displays the name of the operation you have selected.

Figure 3: Try the Service

Note: Instead of using this user interface, you can also manually place the .class files into 'CARBON_HOME/repository/pojoservices', and those .class files can be deployed as POJO services.

Generating the Client

You can generateaclient for a successful service using the WSO2 Webservice Application Server (WSO2 WSAS).

Figure 4: Generating Client

  1. In the navigator, under Manage/Service, click List. The Deployed Services page appears.
  2. Click on the service name for which you want to generate the client.The Service Dashboard page appears.
  3. Click Generate Client. The WSDL2 page appears.
  4. Enter or select the appropriate values in the WSDL2Code page.
  5. Click Generate.

Note: The quality of the service can be managed through the features and options available in the Quality of Service Configuration panel on the Service Dashboard page.