WAS v8.5 > Reference > Command-line utilitieswsdeploy command
Use wsdeploy to add WebSphere product-specific deployment classes to a web services-compatible enterprise application EAR file or an application client JAR file.
The wsdeploy command is supported by JAX-RPC applications. The JAX-WS programming model that is implemented by the application server does not support wsdeploy. If the web services application contains only JAX-WS endpoints, we do not need to run wsdeploy, which is used to process only JAX-RPC endpoints.
The deployment classes that are added by the wsdeploy tool to a web services-compatible EAR file or a JAR file include:
- Stubs
- Serializers and deserializers
- Implementations of service interfaces
This deployment step must be performed at least once, and can be performed more often. Deployment can be performed separately using wsdeploy, assembly tools, or when the application is installed. When using wsadmin for installation, specify the -deployws option.
The wsdeploy command operates as noted in the following list:
- 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 Web Services Description Language (WSDL) files are located and the WSDL2Java command is run with the role deploy-server option.
- If the module contains web services clients, indicated by the presence of the client deployment descriptor, the associated WSDL files are located and the WSDL2Java command is run with the role deploy-client option.
- The files generated by the WSDL2Java command are compiled and repackaged.
See the WSDL2Java command for JAX-RPC applications command information to learn more 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 variable when the generated files are compiled.
wsdeploy command syntax
The command syntax is noted in the following example:
wsdeploy Input_filename Output_filename [options]
Required options:
- Input_filename
Path to the EAR or JAR file to deploy.
- Output_filename
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.
Other options:
- -jardir directory
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 add to the CLASSPATH when the generated classes are compiled. Multiple entries are separated the same as they are in the CLASSPATH environment variable.
- -codegen
Specifies to generate but not compile deployment code. This option implicitly specifies the -keep option.
- -debug
Includes debugging information when compiling, that is, use javac -g to compile.
- -help
Displays a help message and exit.
- -ignoreerrors
Do not stop deployment if validation or compilation errors are encountered.
- -keep
Do not delete working directories containing generated classes. A message is displayed indicating the name of the working directory that is retained.
- -novalidate
Do not validate the web services deployment descriptors in the input file.
- -trace
Displays processing information, including the names of the generated files.
- -compliancelevel level
Sets the JDK level for compiler compliance. Valid values include: 1.4, 5.0, 6.0 (default) and 7.0. This flag is optional.
The following example illustrates how the options are used with wsdeploy:
wsdeploy 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.The following messages may be displayed:
- Flag -f is not valid.
Option f was not recognized as a valid option.
- Flag -c is ambiguous.
Options can be abbreviated, but the abbreviation must be unique. In this case, wsdeploy cannot determine which option was intended.
- Flag -c is missing parameter -p.
A required parameter for an option is omitted.
- Missing p parameter.
A required option is omitted.
Related concepts:
Development and assembly tools
Related
Deploy web services applications onto application servers
Reference:
WSDL2Java command for JAX-RPC applications