The wsdeploy command adds WebSphere product-specific deployment classes to a Web services compatible enterprise application EAR file or an application client JAR file. These classes include:
This deployment step must be performed at least once, and can be performed more than once. Deployment can be performed separately using the wsdeploy command, the Assembly Toolkit, or when the application is installed.
- When using the wsadmin command for installation, specify the -deployws option.
- When using the administrative console for installation, select the Deploy Web services check box.
- When using the Assembly Toolkit, Right-click the module and select...Web Services | Deploy Web Services
To download the Assembly Toolkit, go to...WebSphere Application Server V5.0.2's Application Server Toolkit
The wsdeploy command operates as follows...
- Each module in the enterprise application or JAR file is examined
- If the module contains Web services implementations, indicated by the presence of the webservices.xml deployment descriptor, the associated WSDL files are located and the WSDL2Java command is run with the role deploy-server.
- If the module contains Web services clients, indicated by the presence of the webservicesclient.xml deployment descriptor, the associated WSDL files are located and the WSDL2Java command is run with the role deploy-client.
- The files generated by the WSDL2Java command are compiled and repackaged.
See WSDL2Java command for more information about the files that are generated for deployment.
When the generated files are compiled, they can reference application-specific classes outside the EAR or JAR file if the EAR or JAR file is not self-contained. In this case, use either the -jardir or -cp option to specify additional JAR or zip files to be added to CLASSPATH when the generated files are compiled.
wsdeploy command syntax
The command syntax is as followswsdeploy Input_filename Output_filename [options]
Specifies the path to the EAR or JAR file to be deployed.
Specifies the path of the deployed EAR or JAR file. If output_filename already exists, it is silently overwritten. The output_filename can be the same as the input_filename.
- -jardir directory
Specifies a directory containing JAR or zip files. All JAR and zip files in this directory are added to the CLASSPATH used to compile the generated files. This option can be specified zero or more times.
- -cp entries
Specifies entries to be added to CLASSPATH when the generated classes are compiled. Multiple entries are separated the same as they would be in the CLASSPATH environment variable, with a semicolon on Windows platforms and a colon for UNIX platforms.
Specifies that deployment code is to be generated, but not compiled. This option implicitly specifies the -keep option.
Includes debugging information when compiling, that is, use javac -g to compile.
Displays a help message and exit.
Do not stop deployment if validation or compilation errors are encountered.
Do not delete working directories containing generated classes. A message is displayed indicating the name of the working directory that is retained.
Displays processing information, including the names of the generated files.
Examplewsdeploy x.ear x_deployed.ear -trace -keep Processing web service module x_client.jar. Keeping directory: f:\temp\Base53383.tmp for module: x_client.jar. Parsing XML file:f:\temp\Base53383.tmp\WarDeploy.wsdl Generating f:\temp\Base53383.tmp\generatedSource\com\test\WarDeploy.java Generating f:\temp\Base53383.tmp\generatedSource\com\test\WarDeployLocator.java Generating f:\temp\Base53383.tmp\generatedSource\com\test\HelloWsBindingStub.java Compiling f:\temp\Base53383.tmp\generatedSource\com\test\WarDeploy.java. Compiling f:\temp\Base53383.tmp\generatedSource\com\test\WarDeployLocator.java. Compiling f:\temp\Base53383.tmp\generatedSource\com\test\HelloWsBindingStub.java. Done processing module x_client.jar.
- Flag -f is not valid
Option f was not recognized as being a valid option.
- Flag -c is ambiguous
Options may be abbreviated, but the abbreviation must be unique. In this case, the wsdeploy command can not determine which option was intended.
- Flag -c is missing parameter -p
A required parameter for an option was omitted.
- Missing p parameter
A required option was omitted.
See AlsoDeploying Web services based on Web Services for J2EE