Author: buildbot
Date: Fri Aug 24 11:47:28 2012
New Revision: 830015

Log:
Production update by buildbot for cxf

Modified:
    websites/production/cxf/content/cache/docs.pageCache
    websites/production/cxf/content/docs/jaxrs-services-description.html

Modified: websites/production/cxf/content/cache/docs.pageCache
==============================================================================
Binary files - no diff available.

Modified: websites/production/cxf/content/docs/jaxrs-services-description.html
==============================================================================
--- websites/production/cxf/content/docs/jaxrs-services-description.html 
(original)
+++ websites/production/cxf/content/docs/jaxrs-services-description.html Fri 
Aug 24 11:47:28 2012
@@ -311,7 +311,7 @@ RESTful Web applications. Please check t
 
 <p>Note that the code generation from the WADL documents containing multiple 
root resources with no "id" attributes is supported starting from CXF 2.5.0.</p>
 
-<p>If WADL "method" element has no "id" attribute set then a "name" attribute 
will be used to name generated class methods, example: "get", "post", etc. That 
should produce a valid code even when a resource contains multiple methods with 
the same name - but usually with different set of parameters. </p>
+<p>If WADL "method" element has no "id" attribute set then a combination of 
the element's "name" attribute and the current path will be used to name 
generated class methods, example: "getbookid", where the method name is "GET", 
and the path is "/book/{id}".</p>
 
 <p>Classes generated from schemas will have a package name derived from a 
given schema target namespace by default. wadltojava tool lets customize it as 
well.</p>
 
@@ -321,23 +321,36 @@ RESTful Web applications. Please check t
 
 <div class="preformatted panel" style="border-width: 1px;"><div 
class="preformattedContent panelContent">
 <pre>wadl2java -p &lt;package-name&gt; -sp &lt;[schema-namespace 
=]package-name&gt;* 
+          -tMap &lt;schema-type = java-type&gt;* -repMap &lt;media-type = 
java-type&gt;*
           -resource &lt;resource-name&gt; -b &lt;binding-file-name&gt;* 
-catalog &lt;catalog-file-name&gt; 
           -d &lt;output-directory&gt; -compile -classdir 
&lt;compile-classes-directory&gt; -interface -impl 
-          -generateEnums -supportMultipleXmlReps
+          -noTypes -inheritResourceParams -generateEnums 
-supportMultipleXmlReps
           -h -v -verbose -quiet &lt;wadl&gt;
 </pre>
 </div></div>  
 
+<p>Note 'tMap', 'repMap', 'noTypes' and 'inheritResourceParams' options are 
supported starting from CXF 2.6.3.</p>
+
 <p>The options are reviewed in the following table.</p>
 
 <div class="table-wrap">
-<table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" 
class="confluenceTh"> Option </th><th colspan="1" rowspan="1" 
class="confluenceTh"> Interpretation </th></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"> <tt>-?</tt>,<tt>-h</tt>,<tt>-help</tt> </td><td 
colspan="1" rowspan="1" class="confluenceTd"> Displays the online help for this 
utility and exits. </td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"> <tt>-p PackageName</tt> </td><td colspan="1" rowspan="1" 
class="confluenceTd"> Specifies the package name of root resource classes 
</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>-sp [ 
schema-namespace= ] PackageName</tt> </td><td colspan="1" rowspan="1" 
class="confluenceTd"> Specifies one or more package names corresponding to 
individual schema namespaces </td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"> <tt>-resource RootResourceName</tt> </td><td colspan="1" 
rowspan="1" class="confluenceTd"> Specifies a
  full name of root resource class if WADL contains a single resource 
</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> 
<tt>-interface</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> 
Default option unless -impl option is used - Java interfaces with JAX-RS 
annotations are generated </td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"> <tt>-impl</tt> </td><td colspan="1" rowspan="1" 
class="confluenceTd"> Generates starting implementation code. Can be used with 
-interface option </td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"> <tt>-b binding-name</tt> </td><td colspan="1" rowspan="1" 
class="confluenceTd"> Specifies JAXB binding files. Use multiple -b flags to 
specify multiple entries. </td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"> <tt>-catalog catalog-file-name</tt> </td><td colspan="1" 
rowspan="1" class="confluenceTd"> Specifies catalog file to map referenced 
wadl/schemas </td></tr><tr><td colspan="1" rowspan="
 1" class="confluenceTd"> <tt>-d output-directory</tt> </td><td colspan="1" 
rowspan="1" class="confluenceTd"> Specifies the directory into which the 
generated code files are written. </td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"> <tt>-compile</tt> </td><td colspan="1" rowspan="1" 
class="confluenceTd"> Compiles generated Java files. </td></tr><tr><td 
colspan="1" rowspan="1" class="confluenceTd"> <tt>-classdir 
compile-class-dir</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> 
Specifies the directory into which the compiled class files are written. 
</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> 
<tt>-generateEnums</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> 
Generates Java enums for parameters with options. </td></tr><tr><td colspan="1" 
rowspan="1" class="confluenceTd"> <tt>-supportMultipleXmlReps</tt> </td><td 
colspan="1" rowspan="1" class="confluenceTd"> Generates separate method for 
every XML representation in a singl
 e WADL request element. </td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"> <em>wadlurl</em> </td><td colspan="1" rowspan="1" 
class="confluenceTd"> The path and name of the WADL file to use in generating 
the code. </td></tr></tbody></table>
+<table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" 
class="confluenceTh"> Option </th><th colspan="1" rowspan="1" 
class="confluenceTh"> Interpretation </th></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"> <tt>-?</tt>,<tt>-h</tt>,<tt>-help</tt> </td><td 
colspan="1" rowspan="1" class="confluenceTd"> Displays the online help for this 
utility and exits. </td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"> <tt>-p PackageName</tt> </td><td colspan="1" rowspan="1" 
class="confluenceTd"> Specifies the package name of root resource classes 
</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>-sp [ 
schema-namespace= ] PackageName</tt> </td><td colspan="1" rowspan="1" 
class="confluenceTd"> Specifies one or more package names corresponding to 
individual schema namespaces </td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"> <tt>-resource RootResourceName</tt> </td><td colspan="1" 
rowspan="1" class="confluenceTd"> Specifies a
  full name of root resource class if WADL contains a single resource 
</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> 
<tt>-interface</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> 
Default option unless -impl option is used - Java interfaces with JAX-RS 
annotations are generated </td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"> <tt>-impl</tt> </td><td colspan="1" rowspan="1" 
class="confluenceTd"> Generates starting implementation code. Can also be used 
with -interface option </td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"> <tt>-noTypes</tt> </td><td colspan="1" rowspan="1" 
class="confluenceTd"> Requests that no schema generation is needed. Can also be 
used with -tMap option </td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"> <tt>-tMap schema-type=java-type</tt> </td><td colspan="1" 
rowspan="1" class="confluenceTd"> Provides mapping between schema elements and 
java types </td></tr><tr><td colspan="1" rowspan=
 "1" class="confluenceTd"> <tt>-repMap media-type=java-type</tt> </td><td 
colspan="1" rowspan="1" class="confluenceTd"> Provides mapping between media 
types and java types </td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"> <tt>-b binding-name</tt> </td><td colspan="1" rowspan="1" 
class="confluenceTd"> Specifies JAXB binding files. Use multiple -b flags to 
specify multiple entries. </td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"> <tt>-catalog catalog-file-name</tt> </td><td colspan="1" 
rowspan="1" class="confluenceTd"> Specifies catalog file to map referenced 
wadl/schemas </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> 
<tt>-d output-directory</tt> </td><td colspan="1" rowspan="1" 
class="confluenceTd"> Specifies the directory into which the generated code 
files are written. </td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"> <tt>-compile</tt> </td><td colspan="1" rowspan="1" 
class="confluenceTd"> Compiles generated Java fi
 les. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> 
<tt>-classdir compile-class-dir</tt> </td><td colspan="1" rowspan="1" 
class="confluenceTd"> Specifies the directory into which the compiled class 
files are written. </td></tr></tbody></table>
+</div>
+
+<p>inheritResourceParams</p>
+<div class="table-wrap">
+<table class="confluenceTable"><tbody><tr><td colspan="1" rowspan="1" 
class="confluenceTd"> <tt>-inheritResourceParams</tt> </td><td colspan="1" 
rowspan="1" class="confluenceTd"> Get current resource-level path or matrix 
parameters added to generated methods for all descendant 
resources.</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> 
<tt>-generateEnums</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> 
Generates Java enums for parameters with options. </td></tr><tr><td colspan="1" 
rowspan="1" class="confluenceTd"> <tt>-supportMultipleXmlReps</tt> </td><td 
colspan="1" rowspan="1" class="confluenceTd"> Generates separate method for 
every XML representation in a single WADL request element. </td></tr><tr><td 
colspan="1" rowspan="1" class="confluenceTd"> <em>wadlurl</em> </td><td 
colspan="1" rowspan="1" class="confluenceTd"> The path and name of the WADL 
file to use in generating the code. </td></tr></tbody></table>
 </div>
 
 
 <p>You must specify the absolute or relative path to the WADL document as the 
last argument.<br clear="none">
 OASIS catalog files can be used to help the tool resolve referenced WADL and 
schema documents.</p>
 
+<p>Note 'tMap' option can be used to map between schema element references and 
java types and can be used to customize the default schema to Java type 
mapping. For example, in order to override a default parameter 'xs:date' to 
java.util.Date mapping one can do '-tMap {<a shape="rect" class="external-link" 
href="http://www.w3.org/2001/XMLSchema"; 
rel="nofollow">http://www.w3.org/2001/XMLSchema</a>}date=javax.xml.datatype.XMLGregorianCalendar'
 - this can affect the "&lt;wadl:param type='xs:date'&gt;" declarations.<br 
clear="none">
+Alternatively, in combination with a '-noTypes' switch, this option can be 
used to request that a custom Java type reference should be generated. For 
example, if one prefers to use 'javax.xml.transform.Source' for handling a 
given XML payload, one can do <br clear="none">
+'-tMap {<a shape="rect" class="external-link" href="http://book"; 
rel="nofollow">http://book</a>}Book=javax.xml.transform.Source', this will 
affect "&lt;wadl:representation element='ns:Book'&gt;" declarations where 'ns' 
prefix is bound to the 'http://book' namespace. Similarly, a schema reference 
to Atom Feed element can be mapped to say Abdera Feed class. </p>
+
+<p>The 'repMap' option is similar and provides a mapping between the 
representations of a given media type and Java type. For example, if one has to 
process different XML representations in one method, a mapping like '-repMap 
application/xml=javax.xml.transform.Source' will work, affecting declarations 
like "&lt;wadl:representation mediaTpe='application/xml'". Similarly CXF 
org.apache.cxf.jaxrs.ext.multipart.MultipartBody class can be linked to 
'multipart/form-data' representations, etc.</p>
 
 <h3><a shape="rect" 
name="JAXRSServicesDescription-JAXBcustomizations"></a>JAXB customizations</h3>
 


Reply via email to