What is a Service Client?

If you try to look at the internals of Axis2 a little bit beyond the generated stubs, you will see the ServiceClient class. Let us look at what it means.

Date: Sun, 30th Nov, 2008
Level: Introductory
Reads: 1422 Comments: 0 | Login or register to post comments
Eran Chinthaka
Software Engineer
WSO2 Inc.
chinthaka's picture

The ServiceClient class, within Axis2, is the client API (Application Programme Interface) to the service being invoked. Each instance of this class is associated with a given service hosted somewhere else on the Web. Methods inside the Service Client class will provide a convenient API to access the operations of the service. These methods correspond to the most commonly used message exchange patterns. For example, the sendReceive method helps to do a synchronous In-Out method invocation and the sendRobust method helps to invoke a Robust In-Only operation.

Some of these methods also provide the option of non-blocking invocations. For example, the sendReceiveNonBlocking method will help to do a asynchronous In-Out method invocation.

In addition to these, the ServiceClient API provides a convenient API to interact with the message and the message context. Using the service client, you can easily add SOAP headers to the outgoing message and also set properties to the message context. Thereby dynamically customizing the internal behavior of the Axis2 engine.

 

Applies To

1. Apache Axis2/Java

 

library project main code
Learn Cloud
Learn
Cloud

The WSO2 Application Server is a reliable application server that can host your enterprise web applications. The WSO2 Application Server as a Service is offered in StratosLive, the WSO2 Platform as a Service. This article explains how a simple web application can be developed and deployed from Carbon Studio to the WSO2 Application Server...

Latest Webinar
KeellsSuper is a leading supermarket chain with 50-plus outlets in Sri Lanka, and it offers the only online supermarket in the country. In 2005, JKH implemented SAP ERP across it’s 70 subsidiaries...
Thursday, February 16th 2012, 09.00 AM (PST)

Thursday, February 16th 2012, 10.00 AM (GMT)