Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

No Format
jaxws/wsgen -classpath <path> -cp <path> -d <directory> -extension -help -keep -r <directory> -verbose -version -wsdl[:protocol]
 -servicename <name> -portname <name>

Generating JAX-WS artifacts from WSDL

The jaxws/wsdl2java command can be used to create java classes from WSDL, and uses this syntax:

No Format

jaxws/wsdl2java -fe <front-end-name>* -db <data-binding-name>* -wv <wsdl-version> -p <[wsdl-namespace = ]package-name>* -sn 
<service-name> -b <bindling-file-name> -catalog <catalog-file-name> -d <output-directory> -compile -classdir <compile-classes-directory> -impl -server -client 
-all -autoNameResolution -defaultValues<=class-name-for-DefaultValueProvider> -ant -nexclude <schema-namespace [=java=package-
name]>* -exsh <<true,false>> -dns <<true,false>> -dex <<true,false>> -validate -keep -wsdllocation <wsdlLocation> -xjc 
<xjc-arguments> -noAddressBinding -h -v -verbose -quiet <wsdlurl>

The arguments used to manage the code generation process are reviewed in the following table.

The arguments used to manage the code generation process are reviewed in the following table.

-classpath or -cp

-classpath <path> or -cp <path>

Specifies the location of the service implementation class.

-d

-d <directory>

Specifies where to place the generated output files.

-extension

-extension

Specifies whether to allow custom extensions for functionality not specified by the JAX-WS specification. Use of the extensions can result in applications that are not portable or do not interoperate with other implementations.

-help

-help

Displays the help information.

-keep

-keep

Specifies whether to keep the generated source files.

-r

-r <directory>

This parameter is only used in conjunction with the -wsdl parameter. Specifies where to place the generated WSDL file.

-verbose

-verbose

Specifies to output messages about what the compiler is doing.

-version

-version

Prints the version information. If you specify this option, only the version information will be output and normal command processing will not occur.

<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="fb63b6a2-9635-4243-88ba-ab6d15881139"><ac:plain-text-body><![CDATA[

-wsdl

-wsd [:protocol]

By default, wsgen does not generate a WSDL file. This optional parameter causes wsgen to generate a WSDL file and is typically only used to allow a developer to review a WSDL file before the endpoint is deployed. The protocol is optional and specifies the protocol used in the wsdl:binding. Valid values for protocol are soap 1.1 and Xsoap 1.2. The default value is soap 1.1. The Xsoap 1.2 value is not standard and can only be used in conjunction with the -extension option.

]]></ac:plain-text-body></ac:structured-macro>

-servicename

-servicename <name>

This parameter is only used in conjunction with the -wsdl option. Specifies a wsdl:service name to be generated in the WSDL file.

This command can be used with some extentions:

  • -XadditionalHearders
  • -Xauthfile
  • -Xbebug
  • -Xno-address-databindling
  • -Xnocompile

Generating JAX-WS artifacts from WSDL

The jaxws/wsdl2java command can be used to create java classes from WSDL, and uses this syntax:

No Format

jaxws/wsdl2java -fe <front-end-name>* -db <data-binding-name>* -wv <wsdl-version> -p <[wsdl-namespace = ]package-name>* -sn 
<service-name> -b <bindling-file-name> -catalog <catalog-file-name> -d <output-directory> -compile -classdir <compile-classes-directory> -impl -server -client 
-all -autoNameResolution -defaultValues<=class-name-for-DefaultValueProvider> -ant -nexclude <schema-namespace [=java=package-
name]>* -exsh <<true,false>> -dns <<true,false>> -dex <<true,false>> -validate -keep -wsdllocation <wsdlLocation> -xjc 
<xjc-arguments> -noAddressBinding -h -v -verbose -quiet <wsdlurl>

The arguments used to manage the code generation process are reviewed in the following table.

Option

Usage

Description

-help or -h

-help or -h

Displays the online help for this utility.

-fe

-fe <frontend-name>

Specifies the frontend. Default is JAXWS. Currently supports only JAXWS frontend.

-db

-db <databinding-name>

Specifies the databinding. Default is JAXB. Currently supports only JAXB databinding.

-wv

-wv <wsdl-version>

Specifies the wsdl version .Default is WSDL1.1. Currently suppports only WSDL1.1 version.

<ac:structured-macro ac:name="unmigrated-wiki

Option

Usage

Description

-help or -h

-help or -h

Displays the online help for this utility.

-fe

-fe <frontend-name>

Specifies the frontend. Default is JAXWS. Currently supports only JAXWS frontend.

-db

-db <databinding-name>

Specifies the databinding. Default is JAXB. Currently supports only JAXB databinding.

-wv

-wv <wsdl-version>

Specifies the wsdl version .Default is WSDL1.1. Currently suppports only WSDL1.1 version.

<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="0f1dbfe8-71cd-4025-b3e5-9ba6b58d55e8"><ac:plain-text-body><![CDATA[

-p

-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.

]]></ac:plain-text-body></ac:structured-macro>

-sn

-sn <service-name>

The WSDL service name to use for the generated code.

-b

-b <bindling-file-name>

Specifies zero, or more, JAXWS or JAXB binding files. Use spaces to separate multiple entries.

-catalog

-catalog <catalog-file-name>

Specify catalog file to map the imported wsdl/schema.

-d

-d <output-directory>

Specifies the directory into which the generated code files are written.

-compile

-compile

Compiles generated Java files.

-classdir

-classdir <compile-classes-directory>

Specifies the directory into which the compiled class files are written.

-impl

-impl

Generates starting point code for an implementation object.

-client

-client

Generates starting point code for a client mainline.

-server

-server

Generates starting point code for a server mainline.

-all

-all

Generates all starting point code: types, service proxy, service interface, server mainline, client mainline, implementation object, and an Ant build.xml file.

-autoNameResolution

-autoNameResolution

Automatically resolve naming conflicts without requiring the use of binding customizations.

<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="3f50685455517bf6-39137621-405f4fa5-8c6f800a-08b9156d737fe0999141f141"><ac:plain-text-body><![CDATA[

-defaultValuesp

-defaultValues=[DefaultValueProvider impl] 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. Specifies that default values are generated for the impl and client. You can also provide a custom default value provider. The default provider is RandomValueProvider.

]]></ac:plain-text-body></ac:structured-macro>

-ant sn

-sn <service-ant

Generates the Ant build.xml file.

<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="f1104f62-6896-4bda-b5c8-b700d3e85c03"><ac:plain-text-body><![CDATA[

-nexclude

-nexclude <schema-namespace [=java=package-name]>*

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).

]]></ac:plain-text-body></ac:structured-macro>

-exsh

-exsh <<true,false>>

Enables or disables processing of implicit SOAP headers (i.e. SOAP headers defined in the wsdl:binding but not wsdl:portType section.) Default is false.

-dns

-dns <<true,false>>

Enables or disables the loading of the default namespace package name mapping. Default is true and

http://www.w3.org/2005/08/addressing=org.apache.cxf.ws.addressingImage Removed

namespace package mapping will be enabled.

-dex

-dex <<true,false>>

Enables or disables the loading of the default excludes namespace mapping. Default is true.

-validate

-validate

Enables validating the WSDL before generating the code.

-keep

-keep

Specifies that the code generator will not overwrite any preexisting files. You will be responsible for resolving any resulting compilation issues.

-wsdlLocation

-wsdllocation <wsdlLocation>

Specifies the value of the @WebServiceClient annotation's wsdlLocation property.

-xjc

-xjc <xjc-arguments>

Specifies a comma separated list of arguments that are passed directly to the XJC processor when using the JAXB databinding. A list of available XJC plugins can be obtained using -xjc-X.

-noAddressBinding

-noAddressBinding

For compatibility with CXF 2.0, this flag directs the code generator to generate the older CXF proprietary WS-Addressing types instead of the JAX-WS 2.1 compliant WS-Addressing types.

-v

-v

Displays the version number for the tool.

-verbose

-verbose

Displays comments during the code generation process.

-queit

-quiet

Suppresses comments during the code generation process.

<wsdlurl>

<wsdlurl>

The path and name of the WSDL file to use in generating the code.

The jaxws/wsimport command can be used to create java classes from WSDL, and uses this syntax:

...

name>

The WSDL service name to use for the generated code.

-b

-b <bindling-file-name>

Specifies zero, or more, JAXWS or JAXB binding files. Use spaces to separate multiple entries.

-catalog

-catalog <catalog-file-name>

Specify catalog file to map the imported wsdl/schema.

-d

-d <output-directory>

Specifies the directory into which the generated code files are written.

-compile

-compile

Compiles generated Java files.

-classdir

-classdir <compile-classes-directory>

Specifies the directory into which the compiled class files are written.

-impl

-impl

Generates starting point code for an implementation object.

-client

-client

Generates starting point code for a client mainline.

-server

-server

Generates starting point code for a server mainline.

-all

-all

Generates all starting point code: types, service proxy, service interface, server mainline, client mainline, implementation object, and an Ant build.xml file.

-autoNameResolution

-autoNameResolution

Automatically resolve naming conflicts without requiring the use of binding customizations.

<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="8cf3f20e-cac1-4366-9d1f-aee108f304b2"><ac:plain-text-body><![CDATA[

-defaultValues

-defaultValues=[DefaultValueProvider impl]

Specifies that default values are generated for the impl and client. You can also provide a custom default value provider. The default provider is RandomValueProvider.

]]></ac:plain-text-body></ac:structured-macro>

-ant

-ant

Generates the Ant build.xml file.

<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="5d6a4225-eb7b-4871-bfc5-cd9090ae098c"><ac:plain-text-body><![CDATA[

-nexclude

-nexclude <schema-namespace [=java=package-name]>*

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).

]]></ac:plain-text-body></ac:structured-macro>

-exsh

-exsh <<true,false>>

Enables or disables processing of implicit SOAP headers (i.e. SOAP headers defined in the wsdl:binding but not wsdl:portType section.) Default is false.

-dns

-dns <<true,false>>

Enables or disables the loading of the default namespace package name mapping. Default is true and

http://www.w3.org/2005/08/addressing=org.apache.cxf.ws.addressingImage Added

namespace package mapping will be enabled.

-dex

-dex <<true,false>>

Enables or disables the loading of the default excludes namespace mapping. Default is true.

-validate

-validate

Enables validating the WSDL before generating the code.

-keep

-keep

Specifies that the code generator will not overwrite any preexisting files. You will be responsible for resolving any resulting compilation issues.

-wsdlLocation

-wsdllocation <wsdlLocation>

Specifies the value of the @WebServiceClient annotation's wsdlLocation property.

-xjc

-xjc <xjc-arguments>

Specifies a comma separated list of arguments that are passed directly to the XJC processor when using the JAXB databinding. A list of available XJC plugins can be obtained using -xjc-X.

-noAddressBinding

-noAddressBinding

For compatibility with CXF 2.0, this flag directs the code generator to generate the older CXF proprietary WS-Addressing types instead of the JAX-WS 2.1 compliant WS-Addressing types.

-v

-v

Displays the version number for the tool.

-verbose

-verbose

Displays comments during the code generation process.

-queit

-quiet

Suppresses comments during the code generation process.

<wsdlurl>

<wsdlurl>

The path and name of the WSDL file to use in generating the code.

The jaxws/wsimport command can be used to create java classes from WSDL, and uses this syntax:

No Format

jaxws/wsimport -b <path> -B <jaxBOption> -catalog <file> -d <directory> -extension -help -httpproxy:<host>:<port> -keep -p <pkg>
-quiet -s <directory> -target <version> -verbose -version -wsdllocation <location>

The arguments used to manage the code generation process are reviewed in the following table.

-d

<directory>

Specifies where to place the generated output files.

-b

<path>

Specifies the external JAX-WS or JAXB binding files. You can specify multiple JAX-WS and JAXB binding files by using the -b option; however, each file must be specified with its own -b option.

-catalog

-catalog <file>

Specifies the catalog file to resolve external entity references. It supports the TR9401, XCatalog, and the OASIS XML Catalog formats

-extension

-extension

Specifies whether to accept custom extensions for functionality that are not specified by the JAX-WS specification. The use of custom extensions can result in applications that are not portable or do not interoperate with other implementations

.

-help

-help

Displays the help information.

-httpproxy

-httpproxy:<host>:<port>

Specifies an HTTP proxy. The default port value is 8080.

-keep

-keep

Specifies whether to keep the generated source files.

-p

-p <pkg>

Specifies a target package with this command-line option and overrides any WSDL file and schema binding customization for the package name and the default package name algorithm defined in the JAX-WS specification.

-s

-s <directory>

Specifies the directory to place the generated source files.

-target

-target <version>

 

-verbose

-verbose

Specifies to output messages about what the compiler is doing.

-version

-version

Prints the version information. If you specify this option, only the version information is included in the output and normal command processing does not occur.

-wsdlLocation

-wsdllocation <location>

Specifies the @WebServiceClient.wsdlLocation value.

...