Here is an example of configuring in the client side.
<package.InterfaceName id="localService" Instantiate="factoryElement" FactoryClass="com.ibm.btt.remote.ServiceProxyFactory" serviceUrl="http://${citationhost}/BTTRemoteConnector" serviceId="remoteServiceName"> </package.InterfaceName>
The URL of the service is set through the serviceUrl property. Here, the handler is named BTTRemoteConnector and is hosted on a machine whose name is configured using a property placeholder. The tag name specifies the interface that the service implements and through which the client invokes methods on the service. serviceId specified the remote service name that defined in server side.
After finish the configuration in client side, you can call the service in the client side.
Here is an example of calling the service in the client side.
ElementFactory factory = new BasicElementFactory("jar:///client.xml"); TestServiceInterface serviceProxy = (TestServiceInterface) factory.getElement("localService");
The interaction between the client and the proxy is illustrated as follow: