

Web Services › User-Written Client Programs › How to Create a Client Stub
How to Create a Client Stub
To enable a user-written client program to access Web Services, the client application developer must create a client stub, using the Web Services WSDL file. Then the client-side stub must be incorporated as an import package into the client program. The stub manages, sends, and receives SOAP messages to communicate with the web service.
- You can create the client stub manually or using a utility. After Web Services is installed, the WSDL file can be accessed using a web browser and saved as an xml file. There are third-party tools, for example WSDL2Java that can be used to query the WSDL and generate a stub for use in application generation.
The WSDL file for Web Services is located at: http://<servername>:<portnumber>/axis2/services/EndevorService?wsdl.
Replace the <servername>:<portnumber> specifications with the name and port number of the web server where your installation of Web Services resides.
- After the stub is written or generated, the client stub has to be compiled and the client application's logic implemented above the stub. The client program must instantiate the stub to invoke the web service. For a client to access the stub, the stub class needs to be present in the classpath of the client application.
Copyright © 2014 CA.
All rights reserved.
 
|
|