Versions Compared

Key

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

...

No Format
wadl2java -p <package-name> -sp <[schema-namespace =]package-name>* 
          -tMap <schema-type = java-type>* -repMap <media-type = java-type>*
          -resource <resource-name> -b <binding-file-name>* -catalog <catalog-file-name> 
          -d <output-directory> -compile -classdir <compile-classes-directory> -interface -impl 
          -noTypes -inheritResourceParams -generateEnums -supportMultipleXmlReps -javaDocs
          -generateResponseIfHeadersSet -generateResponseForMethods<methodNames>* -async<methodNames>* -xjc<xjc-arguments>* 
          -authentication <name:password> -validate -h -v -verbose -quiet <wadl>

...

'generateResponseForMethods' and 'generateResponseIfHeadersSet' - from 2.7.12/3.0.0, 'validate' - from 2.7.13/3.2.0/3.1.0, 'javaDocs' - from 3.1.4, 'authorizationauthentication' - from 3.1.1314/3.2.1

The options are reviewed in the following table.

Option

Interpretation

-?,-h,-help

Displays the online help for this utility and exits.

-p PackageName

Specifies the package name of root resource classes

-sp [ schema-namespace= ] PackageName

Specifies one or more package names corresponding to individual schema namespaces

-resource RootResourceName

Specifies a full name of root resource class if WADL contains a single resource

-interface

Default option unless -impl option is used - Java interfaces with JAX-RS annotations are generated

-impl

Generates starting implementation code. Can also be used with -interface option

-noTypes

Requests that no schema generation is needed. Can also be used with -tMap option

-tMap schema-type=java-type

Provides mapping between schema elements and java types

-repMap media-type=java-type

Provides mapping between media types and java types

-b binding-name

Specifies JAXB binding files. Use multiple -b flags to specify multiple entries.

-catalog catalog-file-name

Specifies catalog file to map referenced wadl/schemas

-d output-directory

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

-compile

Compiles generated Java files.

-classdir compile-class-dir

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

-noVoidForEmptyResponses

Generate JAX-RS Response instead of 'void' for methods with no response representations.

-inheritResourceParams

Get current resource-level path or matrix parameters added to generated methods for all descendant resources.

-generateEnums

Generates Java enums for parameters with options.

-supportMultipleXmlReps

Generates separate method for every XML representation in a single WADL request element.

-javaDocsConverts WADL doc elements into JavaDocs
-generateResponseIfHeadersSetGenerates JAX-RS Response method response type if  WADL response element for a given method has 'header' parameters
-generateResponseForMethods methodNamesGenerates JAX-RS Response method response type, methodNames is a comma-separated list of WADL method name or id attributes

-async methodNames

Adds JAX-RS 2.0 AsyncResponse parameter to generated methods, methodNames is a comma-separated list of WADL method name or id attributes

-authorizationauthentication

Specifies a colon separated user name and password for retrieving the remote WADL content from the servers requiring Basic the authentication

-xjc<xjc args>

Specifies a comma separated list of arguments that are passed directly to the XJC processor, example -xjc-Xts.

-validateValidate a WADL document against the WADL schema

wadlurl

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

...