Command Line Tools
Table of Contents
Using the wsdl2java utility gives you greater control over the code generation process. The syntax of the command is summarized in the following illustration.
The arguments used to manage the code generation process are reviewed in the following table.
|
Command Line Argument |
Interpretation |
|---|---|
|
-? -help -h |
Displays the help for this utility. |
|
-p <[wsdl-namespace=]Package-name>* |
Specifies zero, or more, package names to use for the generated code. Optionally specifies the WSDL namespace to package name mapping. |
|
-b <binding-file-name>* |
Specifies zero, or more, JAXWS or JAXB binding files. Use spaces to separate multiple entries. |
|
-d <output-directory> |
Specifies the directory into which the generated code files are written. |
|
-compile |
Compiles generated Java files. |
|
-classdir |
Specifies the directory into which the compiled class files are written. |
|
-client |
Generates starting point code for a client mainline. |
|
-server |
Generates starting point code for a server mainline. |
|
-impl |
Generates starting point code for an implementation object. |
|
-all |
Generates all starting point code: types, service proxy, service interface, server mainline, client mainline, implementation object, and an Ant build.xml file. |
|
-ant |
Generates the Ant build.xml file. |
|
-nexclude
|
Ignore the specified WSDL schema namespace when generating code. This option may be specified multiple times. Also, optionally specifies the Java package name used by types described in the excluded namespace(s). |
|
-exsh <(true/false)> |
Enables or disables processing of extended soap header message binding. |
|
-validate |
Enables or disables validating the wsdl before generate the code |
|
-v |
Displays the version number for the tool. |
|
-verbose |
Displays comments during the code generation process. |
|
-quiet |
Suppresses comments during the code generation process. |
|
<wsdlfile> |
The path and name of the WSDL file to use in generating the code. |
You must specify the absolute or relative path to the WSDL file as the last argument. All other arguments are optional and may be listed in any order.
The java2wsdl tool uses a Web service endpoint's implementation (SEI) class and associated types classes to generate a WSDL file. The syntax of the command is summarized in the following illustration.
The arguments used to manage the WSDL file generation are reviewed in the following table.
|
Command Line Argument |
Interpretation |
|---|---|
|
Displays the online help for this utility. |
|
-o <output-file> |
Specifies the name of the generated WSDL file. |
|
-cp <class-path> |
Specify the SEI and types class search path of directories and zip/jar files. |
|
-t <target-namespace> |
Specifies the target namespace to use in the generated WSDL file. |
|
-servicename <service-name> |
Specifies the value of the generated <service> element's name attribute. |
|
-v |
Displays the version number for the tool. |
|
-verbose |
Displays comments during the code generation process. |
|
-quiet |
Suppresses comments during the code generation process. |
|
<classname> |
Specifies the name of the service endpoint class. |
This tool will generate a new WSDL file with a SOAP binding from an existing WSDL file containing a portType element. The syntax of the command is summarized in the following illustration.
The arguments used to manage the WSDL file generation are reviewed in the following table.
The -i <port-type-name> and <wsdlurl> arguments are required. If the -style rpc argument is specified, the -n <soap-body-namspace> argument is also required. All other arguments are optional and may be listed in any order.
The wsdl2service tool creates a new WSDL file containing an HTTP or JMS service definition from an existing WSDL document containing a binding element. The syntax of the command is summarized in the following illustration.
The arguments used to manage the WSDL file generation are reviewed in the following table.
|
Command Line Argument |
Interpretation |
|---|---|
|
-? -help -h |
Displays the online help for this utility. |
|
-transport <http/jms> |
Specifies the type of transport to use for the generated service. |
|
-e <service-name> |
Specifies the value of the generated service element's name attribute. |
|
-p <port-name> |
Specifies the value of the generated port element's name attribute. To specify multiple port elements, separate the names by a space. |
|
<address> |
Specifies the value used in the address element of the port. |
|
-n <attribute-binding-name> |
Specifies the binding used to generate the service. |
|
-jds <jms-destionation-Style(queue/topic)> |
JMS destination style (queue/topic) |
-jpu <jms-jndi-provider-URL> |
JMS JNDI provider URL |
-jcf <jms-initial-context-factory> |
JMS initial context factory |
-jfn <jms-jndi-connection-factory-name> |
JMS JNDI connection factory name |
-jdn <jms-jndi-destination-name> |
JMS JNDI destination name |
-jmt <jms-message-type(text/binary)> |
JMS message type(text/binary) |
-jmc <use-messageid-as-correlationid(true/false)> |
Use MessageID As CorrelationID(true/false) |
-jsn <durable-subscriber-name> |
Durable Subscriber Name |
|
-o <output-file> |
Specifies the name of the generated WSDL file. |
|
-d <output-directory> |
Specifies the directory in which the generated WSDL is placed. |
|
-v |
Displays the version number for the tool. |
|
-verbose |
Displays comments during the code generation process. |
|
-quiet |
Suppresses comments during the code generation process. |
|
<wsdlurl> |
The path and name of the existing WSDL file. |
You must specify the -n <attribute-binding-name> argument and the <wsdlurl> argument. All other arguments are optional and may be listed in any order.
The wsdl2xml tool generates an XML binding from an existing WSDL document containing a <portType> definition. The syntax of the command is summarized in the following illustration.
The arguments used to manage WSDL file generation are reviewed in the following table.
|
Command Line Argument |
Interpretation |
|---|---|
|
-? -help -h |
Displays the online help for this utility. |
|
-i <port-type-name> |
Specifies the portType element to use. |
|
-b <binding-name> |
Specifies the name of the generated XML binding. |
|
-e <service-name> |
Specifies the value of the generated <service> element's name attribute. |
|
-p <port-name> |
Specifies the value of the generated <port> element's name attribute. To specify multiple <port> elements, separate the names by a space. |
|
-a <address> |
Specifies the value used in the <address> element of the generated <port> element. |
|
-d <output-directory> |
Specifies the directory to place generated WSDL file. |
|
-o <output-file> |
Specifies the name of the generated WSDL file. |
|
-v |
Displays the version number for the tool. |
|
-verbose |
Displays comments during the code generation process. |
|
-quiet |
Suppresses comments during the code generation process. |
|
<wsdlurl> |
The path and name of the existing WSDL file. |
The -i <port-type-name> and the <wsdlurl> arguments are required. All other arguments are optional and may be listed in any order.
The xsd2wsdl tool imports an XMLSchema document and generates a WSDL file containing a <types> element populated by the types defined in the XMLSchema document. The syntax of the command is summarized in the following illustration.
The arguments used to manage WSDL file generation are reviewed in the following table.
|
Command Line Argument |
Interpretation |
|---|---|
|
-? -help -h |
Displays the online help for this utility. |
|
-t <target-name-space> |
Specifies the target namespace for the generated WSDL. |
|
-n <wsdl-name> |
Specifies the value of the generated <definition> element's name attribute. |
|
-d <output-directory> |
Specifies the directory in which the generated WSDL is placed. |
|
-o <output-file> |
Specifies the name of the generated WSDL file. |
|
-v |
Displays the version number for the tool. |
|
-verbose |
Displays comments during the code generation process. |
|
-quiet |
Suppresses comments during the code generation process. |
|
<xsdurl> |
The path and name of the existing XSDSchema file. |
The -t <target-name-space> and the <xsdurl> arguments are required. All other arguments are optional and may be listed in any order.
The wsdlvalidator tool validates whether a wsdl file or wsdl url is well-formed and schema conformed.
The arguments used to validate WSDL file are reviewed in the following table.
|
Command Line Argument |
Interpretation |
|---|---|
|
-? -help -h |
Displays the online help for this utility. |
|
-d <schema-directory> |
|
|
-s <schema-url> |
Specifies the URL of a user specific schema to be included in the validation of the contract. This switch can appear multiple times. |
|
-v |
Displays the version number for the tool. |
|
-verbose |
Displays comments during the validation. |
|
-quiet |
Suppresses comments during the validation |
|
<wsdlurl> |
The path and name of the existing WSDL file |