Show TOC Start of Content Area

Process documentation Web Service Client Programming Model

Purpose

This process describes a client programming model for accessing and invoking methods of a Web service endpoint.

The Web service (WS) client programming model is based on the programming model defined in JAX-RPC 1.1 and J2EE 1.4 specifications. The programming model allows a J2EE application client, Web component, EJB component, or another Web service to act as a Web service client and invoke a WS endpoint. The programming model does not depend on the Web service endpoint realization on the server side.

Prerequisites

A standalone or deployable proxy is generated.

For more information, see Creating a Deployable Proxy and Creating a Standalone Proxy.

Process Flow

...

       1.      Access the implementation class of the service interface.

This graphic is explained in the accompanying text

 

If you have generated a deployable proxy, you must use a JNDI lookup to access the Web service interface implementation. From the Web service interface, you have access to the SEI. The SEI contains methods that can be used for client programming.

If you have generated a standalone proxy, the implementation class of the Web service interface is instantiated using the default constructor. Use the implementation class to receive a stub that implements the service endpoint interface (SEI).

       2.      Create the instance of a configuration port.

This graphic is explained in the accompanying text

You can get the configuration port using one of the following ways:

     ClientSEI port = (ClientSEI) service.getPort(ClientSEI.class);

     ClientSi port = (ClientSi) service.getConfig1Port();

       3.      Invoke the business methods.

After you get the reference to the configuration port, you invoke the business methods.

 

 

End of Content Area