You need a Web Services Description Language (WSDL) file to use Web services. You can develop your own WSDL file or get one from a Web service provider. This documentation assumes you are creating your own.
WebSphere Application Server provides a utility, the Java2WSDL script, that generates a WSDL file for your Web service based on your application code.
To generate a WSDL file for your Web service, follow these steps:
On the CL command line, run the Start Qshell (STRQSH) command to start Qshell.
Update your CLASSPATH environment variable to include the location of the Service Endpoint Interface class and other referenced classes, for example:
export -s CLASSPATH=/myapp/myclass.class:/myapp/myjar.jar
Run the Java2WSDL command, for example:
Java2WSDL seiInterface
where seiInterface is the name of your Service Endpoint Interface class. For more information, see The Java2WSDL script.
A WSDL file named seiInterface.wsdl is created.
Edit the generated WSDL file and inspect the part names.
The WSDL parts have names like arg_0_0. Modify the WSDL file to use the actual names of the Java parameters.
Move the WSDL file into the wsdl subdirectory of your WAR file:
Note: If your class file is compiled with debugging information and it is not an interface, you can automatically generate and set the correct part names with the Java2WSDL command tool.
Generating and setting the part names is done by providing additional information to the Java2WSDL command in the form of a Java implementation class that implements the same methods as the Service Endpoint Interface and is compiled with debug information on (javac -g). Parameter names are stored in the class file with the debugging information. If your implementation class was compiled with debugging information, you can use the Java2WSDL -implClass seiImpl seiInterface command to generate a WSDL file having the proper part names. For more information, see The Java2WSDL script.