You use the tool in four stages:
Before using the WSDL2Client tool, you must set up the Web services command line as follows:
Now, you can run stage 1 of the WSDL2Client tool.
To create a skeleton Web service client implementation, enter the following in the command prompt:
Hint: Note the command line test directory path and the name that you specify for -project. You will need this information to deploy and test your Web service later.
After you have run the tool with the -project <ProjectDir> argument, a directory named "client-side" that contains several subdirectories is created under the specified project. These subdirectories contain all the necessary Java templates, including serializer and deserializer classes for your complex types, and deployment descriptors that are required to build the Web service implementations. If you have specified your -clientType and -genMain options, you will find also a main class implementation template that has been generated for your client type.
A build script called buildclient_new is also generated to help you compile all this code. If you have run the tool with the -clientType J2SE argument, a run script called runclient is also generated.
After you have written the implementation code, compiled it, and run the tool again with the -createEar <File.ear> argument, the output will be either a new or updated EAR file. You will also notice that the client-side classes that implement the Web service have been moved to the META-INF\classes directory, which is the normal location. If you have specified the -clientType Servlet, you will notice that the client-side classes have been moved to the WEB-INF\classes directory.
Once you have generated an EAR file, you can deploy it to a server to make it available to others. To do this, refer to: Deploying a Web service to a server using the command line tools.