Package org.jvnet.ws.wadl2java

Implements a WADL to Java tool that generates client-side stubs for the resources and methods declared in a WADL file.

See:
          Description

Interface Summary
Resolver This is a simple interface to replace reference to the S2JJAXModel class that is passed around to resolve QName element or URI references to type references.
ResourceClassGenerator A simplified interface to the resource class generators
 

Class Summary
GeneratorUtil Utility functions for code generators.
JavaDocUtil Utility class containing methods for generating JavaDoc from XML documentation embedded in WADL files.
Wadl2Java Processes a WADL file and generates client-side stubs for the resources and methods described.
Wadl2Java.Parameters A parameter object to make it easier to extend this class without having to add more constructors or parameters.
Wadl2JavaMessages Defines string formatting method for each constant in the resource file
 

Package org.jvnet.ws.wadl2java Description

Implements a WADL to Java tool that generates client-side stubs for the resources and methods declared in a WADL file.

Command line usage:

java -jar wadl2java.jar -p package -o directory file.wadl

where:

-p package
Specifies the package used for generated code, e.g. com.example.test
-o directory
Specifies the directory to which files will be written. E.g. if the package is com.example.test and the directory is gen-src then files will be written to ./gen-src/com/example/test. The directory dir must exist, subdirectories will be created as required.
file.wadl
The WADL file to process.

Use as an ant task:

<property name="jaxws.home" value="/path/to/jax-ws/directory" />
<property name="wadl2java.home" value="/path/to/wadl2java/directory" />

<taskdef name="wjc" classname="org.jvnet.ws.wadl2java.WJCTask">
  <classpath>
    <fileset dir="${jaxws.home}" includes="lib/*.jar" />
    <pathelement location="${wadl2java.home}/dist/wadl2java.jar"/>
  </classpath>
</taskdef>

<target name="-pre-compile">
  <echo message="Compiling the description..." />
  <wjc description="file.wadl" package="com.yahoo.search" target="gen-src"/>
</target>

See Also:
WADL Specification


Copyright © 2014. All Rights Reserved.