cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From build...@apache.org
Subject svn commit: r906502 [4/7] - in /websites/production/cxf/content: cache/ docs/
Date Tue, 22 Apr 2014 12:47:36 GMT
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 Tue Apr 22 12:47:36 2014
@@ -118,42 +118,27 @@ Apache CXF -- JAXRS Services Description
          <td height="100%">
            <!-- Content -->
            <div class="wiki-content">
-<div id="ConfluenceContent"><p></p><p></p><p><span style="font-size:2em;font-weight:bold"> JAX-RS Services Description </span></p><p></p><p></p><p></p>
+<div id="ConfluenceContent"><p>&#160;</p><p>&#160;</p><p>&#160;</p><span style="font-size:2em;font-weight:bold"> JAX-RS Services Description </span><p>&#160;</p><p>&#160;</p><p>&#160;</p><p><style type="text/css">/*<![CDATA[*/
+div.rbtoc1398170820085 {padding: 0px;}
+div.rbtoc1398170820085 ul {list-style: disc;margin-left: 0px;}
+div.rbtoc1398170820085 li {margin-left: 0px;padding-left: 0px;}
 
-<style type="text/css">/*<![CDATA[*/
-div.rbtoc1396468204517 {padding: 0px;}
-div.rbtoc1396468204517 ul {list-style: disc;margin-left: 0px;}
-div.rbtoc1396468204517 li {margin-left: 0px;padding-left: 0px;}
-
-/*]]>*/</style><div class="toc-macro rbtoc1396468204517">
+/*]]>*/</style></p><div class="toc-macro rbtoc1398170820085">
 <ul class="toc-indentation"><li><a shape="rect" href="#JAXRSServicesDescription-WADLoverview">WADL overview</a>
 <ul class="toc-indentation"><li><a shape="rect" href="#JAXRSServicesDescription-Basicexample">Basic example</a></li><li><a shape="rect" href="#JAXRSServicesDescription-WADLwithreferences">WADL with references</a></li><li><a shape="rect" href="#JAXRSServicesDescription-SharingdeclarationsbetweenmultipleWADLs">Sharing declarations between multiple WADLs</a></li></ul>
 </li><li><a shape="rect" href="#JAXRSServicesDescription-WADL-firstDevelopment">WADL-first Development</a>
 <ul class="toc-indentation"><li><a shape="rect" href="#JAXRSServicesDescription-wadl2javacommandlinetool">wadl2java command line tool</a>
 <ul class="toc-indentation"><li><a shape="rect" href="#JAXRSServicesDescription-JAXBcustomizations">JAXB customizations</a></li></ul>
 </li><li><a shape="rect" href="#JAXRSServicesDescription-wadl2javaMavenplugin">wadl2java Maven plugin</a></li><li><a shape="rect" href="#JAXRSServicesDescription-Integration">Integration</a></li><li><a shape="rect" href="#JAXRSServicesDescription-ExternalWADLdocumentsandJAXRSendpoints.">External WADL documents and JAXRS endpoints.</a></li></ul>
-</li><li><a shape="rect" href="#JAXRSServicesDescription-WADLAutoGeneration">WADL Auto Generation</a>
-<ul class="toc-indentation"><li><a shape="rect" href="#JAXRSServicesDescription-DocumentingresourceclassesandmethodsingeneratedWADL">Documenting resource classes and methods in generated WADL</a></li><li><a shape="rect" href="#JAXRSServicesDescription-CustomizingWADLGeneration">Customizing WADL Generation</a>
+</li><li><a shape="rect" href="#JAXRSServicesDescription-WADLAutoGenerationatRuntime">WADL Auto Generation at Runtime</a>
+<ul class="toc-indentation"><li><a shape="rect" href="#JAXRSServicesDescription-DocumentingresourceclassesandmethodsingeneratedWADL">Documenting resource classes and methods in generated WADL</a>
+<ul class="toc-indentation"><li><a shape="rect" href="#JAXRSServicesDescription-SupportforJavadoc">Support for Javadoc</a></li></ul>
+</li><li><a shape="rect" href="#JAXRSServicesDescription-CustomizingWADLGeneration">Customizing WADL Generation</a>
 <ul class="toc-indentation"><li><a shape="rect" href="#JAXRSServicesDescription-RepresentingexplicitJAXBcollections">Representing explicit JAXB collections</a></li><li><a shape="rect" href="#JAXRSServicesDescription-RepresentingexternalschemasandnonJAXBtypes">Representing external schemas and non JAXB types</a></li><li><a shape="rect" href="#JAXRSServicesDescription-Changingthebaseaddress">Changing the base address</a></li></ul>
 </li></ul>
-</li><li><a shape="rect" href="#JAXRSServicesDescription-ServicelistingsandWADLqueries">Service listings and WADL queries</a></li><li><a shape="rect" href="#JAXRSServicesDescription-WADLinJSONformat">WADL in JSON format</a></li><li><a shape="rect" href="#JAXRSServicesDescription-HidinglinkstoJAXRSendpointsfromtheservicespage">Hiding links to JAXRS endpoints from the services page</a></li></ul>
-</div>
-
-<p>CXF JAX-RS supports (Web Application Description Language|http://www.w3.org/Submission/wadl] (WADL). <br clear="none">
-Users can use WADL documents to generate the initial code and have WADL auto-generated on demand. </p>
-
-<h1 id="JAXRSServicesDescription-WADLoverview">WADL overview</h1>
-
-<p>WADL is a resource-centric description language which has been designed to facilitate the modeling, description and testing of<br clear="none">
-RESTful Web applications. Please check the official <a shape="rect" class="external-link" href="http://www.w3.org/Submission/wadl/" rel="nofollow">page</a> for more information, this section provides a brief overview of main WADL constructs.</p>
-
-<h2 id="JAXRSServicesDescription-Basicexample">Basic example</h2>
-
-<p>A top level WADL document element is called "application". Usually it may contain a "grammars" section and "resources" element with one or more top-level "resource" elements, with each one representing a specific root resource, for example:</p>
-
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[
-&lt;application xmlns=&quot;http://wadl.dev.java.net/2009/02&quot; xmlns:ns=&quot;http://superbooks&quot;&gt;
+</li><li><a shape="rect" href="#JAXRSServicesDescription-java2wadlMavenplugin">java2wadl Maven plugin</a></li><li><a shape="rect" href="#JAXRSServicesDescription-ServicelistingsandWADLqueries">Service listings and WADL queries</a></li><li><a shape="rect" href="#JAXRSServicesDescription-WADLinJSONformat">WADL in JSON format</a></li><li><a shape="rect" href="#JAXRSServicesDescription-HidinglinkstoJAXRSendpointsfromtheservicespage">Hiding links to JAXRS endpoints from the services page</a></li></ul>
+</div><p>CXF JAX-RS supports (Web Application Description Language|http://www.w3.org/Submission/wadl] (WADL). <br clear="none"> Users can use WADL documents to generate the initial code and have WADL auto-generated on demand.</p><h1 id="JAXRSServicesDescription-WADLoverview">WADL overview</h1><p>WADL is a resource-centric description language which has been designed to facilitate the modeling, description and testing of<br clear="none"> RESTful Web applications. Please check the official <a shape="rect" class="external-link" href="http://www.w3.org/Submission/wadl/" rel="nofollow">page</a> for more information, this section provides a brief overview of main WADL constructs.</p><h2 id="JAXRSServicesDescription-Basicexample">Basic example</h2><p>A top level WADL document element is called "application". Usually it may contain a "grammars" section and "resources" element with one or more top-level "resource" elements, with each one representing a specific root resource, for example:</p
 ><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[&lt;application xmlns=&quot;http://wadl.dev.java.net/2009/02&quot; xmlns:ns=&quot;http://superbooks&quot;&gt;
  &lt;grammars&gt;
   &lt;xs:schema xmlns:xs=&quot;http://www.w3.org/2001/XMLSchema&quot; 
         xmlns:tns=&quot;http://superbooks&quot; attributeFormDefault=&quot;unqualified&quot; elementFormDefault=&quot;unqualified&quot; 
@@ -189,31 +174,8 @@ RESTful Web applications. Please check t
  &lt;/resources&gt;  
 &lt;/application&gt;
 ]]></script>
-</div></div> 
-
-<p>This document describes an application that has "http://localhost:8080/" base URI. It can handle GET requests such as<br clear="none">
-"http://localhost:8080/bookstore/1", "http://localhost:8080/bookstore/123", etc. Additionally it can handle similar GET requests at<br clear="none">
-"http://localhost:8080/books/bookstore/1", "http://localhost:8080/books/bookstore/123", etc, note an extra "books" path segment.</p>
-
-<p>"application/xml" media type is supported and response representation elements link to "{<a shape="rect" class="external-link" href="http://superbooks" rel="nofollow">http://superbooks</a>}thebook" element declared in a schema inlined in the grammars section.</p>
-
-<p>Note that "resources" element has two child "resource" elements, one with "/bookstore/{id}" path, another one with "/books" path. </p>
-
-<p>These 2 resources can be represented as JAX-RS root resources. For example, these resources can be mapped to concrete Java classes such as  BookStoreRootResource with @Path("/bookstore/{id}") and BooksResource with @Path("/books"). BookStoreRootResource root resource will have a single @GET resource method with no @Path, presumably returning Book (JAXB) bean. The second BooksResource root resource will have a single subresource locator with @Path("/bookstore/{id}") which will return a subresource with a single @GET resource method. </p>
-
-<p>This is just one possible interpretation of how the above WADL description can be mapped to JAX-RS resources and methods.</p>
-
-<p>Also note that the resource with the "/books" path has another child resource with the "/bookstore/{id}" path, but it could've had a "/books/bookstore/{id}" path instead and no child resource.</p>
-
-<h2 id="JAXRSServicesDescription-WADLwithreferences">WADL with references</h2>
-
-<p>Basic WADL example in the previous section shows a "grammars" section with the inlined schema, as well as a "resource" description with the "/bookstore/{id}" path listed twice, as an immediate child of the "resources" and as a child of the "resource" element with the "/books" path.</p>
-
-<p>Note that inlined schemas can be included instead by referencing external schemas. Likewise, most of WADL element declarations such as "resource", "method", "representation", etc can be shared by using the same document or external references. Here is how the basic example can be simplified with the help of references:</p>
-
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[
-&lt;application xmlns=&quot;http://wadl.dev.java.net/2009/02&quot; xmlns:ns=&quot;http://superbooks&quot;&gt;
+</div></div><p>This document describes an application that has "http://localhost:8080/" base URI. It can handle GET requests such as<br clear="none"> "http://localhost:8080/bookstore/1", "http://localhost:8080/bookstore/123", etc. Additionally it can handle similar GET requests at<br clear="none"> "http://localhost:8080/books/bookstore/1", "http://localhost:8080/books/bookstore/123", etc, note an extra "books" path segment.</p><p>"application/xml" media type is supported and response representation elements link to "{<a shape="rect" class="external-link" href="http://superbooks" rel="nofollow">http://superbooks</a>}thebook" element declared in a schema inlined in the grammars section.</p><p>Note that "resources" element has two child "resource" elements, one with "/bookstore/{id}" path, another one with "/books" path.</p><p>These 2 resources can be represented as JAX-RS root resources. For example, these resources can be mapped to concrete Java classes such as BookStoreRootResource 
 with @Path("/bookstore/{id}") and BooksResource with @Path("/books"). BookStoreRootResource root resource will have a single @GET resource method with no @Path, presumably returning Book (JAXB) bean. The second BooksResource root resource will have a single subresource locator with @Path("/bookstore/{id}") which will return a subresource with a single @GET resource method.</p><p>This is just one possible interpretation of how the above WADL description can be mapped to JAX-RS resources and methods.</p><p>Also note that the resource with the "/books" path has another child resource with the "/bookstore/{id}" path, but it could've had a "/books/bookstore/{id}" path instead and no child resource.</p><h2 id="JAXRSServicesDescription-WADLwithreferences">WADL with references</h2><p>Basic WADL example in the previous section shows a "grammars" section with the inlined schema, as well as a "resource" description with the "/bookstore/{id}" path listed twice, as an immediate child of the "res
 ources" and as a child of the "resource" element with the "/books" path.</p><p>Note that inlined schemas can be included instead by referencing external schemas. Likewise, most of WADL element declarations such as "resource", "method", "representation", etc can be shared by using the same document or external references. Here is how the basic example can be simplified with the help of references:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[&lt;application xmlns=&quot;http://wadl.dev.java.net/2009/02&quot; xmlns:ns=&quot;http://superbooks&quot;&gt;
  &lt;grammars&gt;
    &lt;include href=&quot;schemas/book.xsd&quot;/&gt;
  &lt;/grammars&gt;
@@ -240,19 +202,8 @@ RESTful Web applications. Please check t
  &lt;/resources&gt;  
 &lt;/application&gt;
 ]]></script>
-</div></div> 
-
-<p>Note that a book.xsd schema resource located in the 'schemas' path relative to the location of this WADL document is referenced using wadl:include element. Abstract resource type "bookResource" is declared as an immediate child of wadl:application and is linked to concrete resource elements using a "#bookResource" reference.</p>
-
-<h2 id="JAXRSServicesDescription-SharingdeclarationsbetweenmultipleWADLs">Sharing declarations between multiple WADLs</h2>
-
-<p>WADL references allow for having WADL documents with abstract declarations only and concrete WADLs referencing them, thus making it possible to reuse resource declarations in different web application descriptions.</p>
-
-<p>For example, the following baseApplication.wadl documents describes an abstract "bookResource" resource:</p>
-
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[
-&lt;application xmlns=&quot;http://wadl.dev.java.net/2009/02&quot; xmlns:ns=&quot;http://superbooks&quot;&gt;
+</div></div><p>Note that a book.xsd schema resource located in the 'schemas' path relative to the location of this WADL document is referenced using wadl:include element. Abstract resource type "bookResource" is declared as an immediate child of wadl:application and is linked to concrete resource elements using a "#bookResource" reference.</p><h2 id="JAXRSServicesDescription-SharingdeclarationsbetweenmultipleWADLs">Sharing declarations between multiple WADLs</h2><p>WADL references allow for having WADL documents with abstract declarations only and concrete WADLs referencing them, thus making it possible to reuse resource declarations in different web application descriptions.</p><p>For example, the following baseApplication.wadl documents describes an abstract "bookResource" resource:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[&lt;application xmlns=&quot;http://wadl.dev.java.net/2009/02&quot; xmlns:ns=&quot;http://superbooks&quot;&gt;
  &lt;grammars&gt;
    &lt;include href=&quot;schemas/book.xsd&quot;/&gt;
  &lt;/grammars&gt;
@@ -267,13 +218,8 @@ RESTful Web applications. Please check t
  &lt;/resource_type&gt;
 &lt;/application&gt;
 ]]></script>
-</div></div> 
-
-<p>and this WADL document links to the abstract resource by using an external WADL reference with a "baseResource" fragment.</p>
-
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[
-&lt;application xmlns=&quot;http://wadl.dev.java.net/2009/02&quot; xmlns:ns=&quot;http://superbooks&quot;&gt;
+</div></div><p>and this WADL document links to the abstract resource by using an external WADL reference with a "baseResource" fragment.</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[&lt;application xmlns=&quot;http://wadl.dev.java.net/2009/02&quot; xmlns:ns=&quot;http://superbooks&quot;&gt;
  
  &lt;resources base=&quot;http://localhost:8080/&quot;&gt;
    &lt;resource path=&quot;/bookstore/{id}&quot; type=&quot;baseApplication.wadl#bookResource&quot;/&gt;
@@ -283,23 +229,8 @@ RESTful Web applications. Please check t
  &lt;/resources&gt;  
 &lt;/application&gt;
 ]]></script>
-</div></div> 
-
-
-<p><strong>New</strong>: Starting from CXF 2.5.0 and 2.4.4 all WADL elements may link to top-level local declarations, see this <a shape="rect" class="external-link" href="http://www.w3.org/Submission/wadl/#x3-36000A.2" rel="nofollow">example</a>. </p>
-
-<h1 id="JAXRSServicesDescription-WADL-firstDevelopment">WADL-first Development</h1>
-
-<p>CXF 2.4.1 introduces a wadl2java code generator and cxf-wadl2java-plugin Maven plugin which can be used to generate server and client JAX-RS code and speed up the transition between modeling and implementation stages. </p>
-
-<p><strong>Note</strong> If you are looking for a wadl2java code generator from a Java.net project started by Marc Hadley then please follow this <a shape="rect" class="external-link" href="http://wadl.java.net/wadl2java.html" rel="nofollow">link</a>.</p>
-
-
-<p>Code generator expects WADL resource and method elements to have "id" attributes set which can provide hints on how to name generated classes and methods. For example:</p>
-
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[
-&lt;application xmlns=&quot;http://wadl.dev.java.net/2009/02&quot; xmlns:ns=&quot;http://superbooks&quot;&gt;
+</div></div><p><strong>New</strong>: Starting from CXF 2.5.0 and 2.4.4 all WADL elements may link to top-level local declarations, see this <a shape="rect" class="external-link" href="http://www.w3.org/Submission/wadl/#x3-36000A.2" rel="nofollow">example</a>.</p><h1 id="JAXRSServicesDescription-WADL-firstDevelopment">WADL-first Development</h1><p>CXF 2.4.1 introduces a wadl2java code generator and cxf-wadl2java-plugin Maven plugin which can be used to generate server and client JAX-RS code and speed up the transition between modeling and implementation stages.</p><p><strong>Note</strong> If you are looking for a wadl2java code generator from a Java.net project started by Marc Hadley then please follow this <a shape="rect" class="external-link" href="http://wadl.java.net/wadl2java.html" rel="nofollow">link</a>.</p><p>Code generator expects WADL resource and method elements to have "id" attributes set which can provide hints on how to name generated classes and methods. For example:</
 p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[&lt;application xmlns=&quot;http://wadl.dev.java.net/2009/02&quot; xmlns:ns=&quot;http://superbooks&quot;&gt;
  &lt;grammars&gt;
   &lt;include href=&quot;schemas/book.xsd&quot;/&gt;
  &lt;/grammars&gt;
@@ -315,24 +246,7 @@ RESTful Web applications. Please check t
  &lt;/resources&gt;  
 &lt;/application&gt;
 ]]></script>
-</div></div>
-
-<p>Note that resource id is "org.apache.cxf.jaxrs.systest.BookStore". Alternatively, expanded QName can be used as "id":<br clear="none">
-"{<a shape="rect" class="external-link" href="http://systest.jaxrs.cxf.apache.org">http://systest.jaxrs.cxf.apache.org</a>}BookStore".</p>
-
-<p>Simple WADL documents containing a single resource only do not have to have "id" attributes set. In such cases a wadltojava "resource" and "-p" options can be used to specify a full root resource class name corresponding to a single WADL resource element, and if neither of these options is set then this single WADL resource will get an "application.Resource" root resource class generated.</p>
-
-<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 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>
-
-<h2 id="JAXRSServicesDescription-wadl2javacommandlinetool">wadl2java command line tool</h2>
-
-<p>Running wadltojava from the command line will produce:</p>
-
-<div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent panelContent">
+</div></div><p>Note that resource id is "org.apache.cxf.jaxrs.systest.BookStore". Alternatively, expanded QName can be used as "id":<br clear="none"> "{<a shape="rect" class="external-link" href="http://systest.jaxrs.cxf.apache.org">http://systest.jaxrs.cxf.apache.org</a>}BookStore".</p><p>Simple WADL documents containing a single resource only do not have to have "id" attributes set. In such cases a wadltojava "resource" and "-p" options can be used to specify a full root resource class name corresponding to a single WADL resource element, and if neither of these options is set then this single WADL resource will get an "application.Resource" root resource class generated.</p><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 combination of the element's "name" attribute and the current path will be used to name gener
 ated 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><h2 id="JAXRSServicesDescription-wadl2javacommandlinetool">wadl2java command line tool</h2><p>Running wadltojava from the command line will produce:</p><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; 
@@ -341,30 +255,8 @@ RESTful Web applications. Please check t
           -xjc&lt;xjc-arguments&gt;* 
           -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, 'noVoidForEmptyResponses' - from 2.6.4, '-async' - from 2.7.1, '-xjc' - from 2.7.4</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"><p> Option </p></th><th colspan="1" rowspan="1" class="confluenceTh"><p> Interpretation </p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>-?</code>,<code>-h</code>,<code>-help</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> Displays the online help for this utility and exits. </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>-p PackageName</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> Specifies the package name of root resource classes </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>-sp [ schema-namespace= ] PackageName</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> Specifies one or more package names corresponding to individual schema namespaces </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>-
 resource RootResourceName</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> Specifies a full name of root resource class if WADL contains a single resource </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>-interface</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> Default option unless -impl option is used - Java interfaces with JAX-RS annotations are generated </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>-impl</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> Generates starting implementation code. Can also be used with -interface option </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>-noTypes</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> Requests that no schema generation is needed. Can also be used with -tMap option </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>-tMap schema-type=jav
 a-type</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> Provides mapping between schema elements and java types </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>-repMap media-type=java-type</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> Provides mapping between media types and java types </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>-b binding-name</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> Specifies JAXB binding files. Use multiple -b flags to specify multiple entries. </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>-catalog catalog-file-name</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> Specifies catalog file to map referenced wadl/schemas </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>-d output-directory</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> Sp
 ecifies the directory into which the generated code files are written. </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>-compile</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> Compiles generated Java files. </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>-classdir compile-class-dir</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> Specifies the directory into which the compiled class files are written. </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>-noVoidForEmptyResponses</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> Generate JAX-RS Response instead of 'void' for methods with no response representations.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>-inheritResourceParams</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> Get current resource-level path or matrix parameters added to gen
 erated methods for all descendant resources.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>-generateEnums</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> Generates Java enums for parameters with options. </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>-supportMultipleXmlReps</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> Generates separate method for every XML representation in a single WADL request element. </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>-async methodNames</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> Adds JAX-RS 2.0 AsyncResponse parameter to generated methods, methodNames is a comma-separated list of WADL method name or id attributes </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>-xjc&lt;xjc args&gt;</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> Specifies a co
 mma separated list of arguments that are passed directly to the XJC processor, example -xjc-Xts.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <em>wadlurl</em> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> The path and name of the WADL file to use in generating the code. </p></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 id="JAXRSServicesDescription-JAXBcustomizations">JAXB customizations</h3>
-
-<p>At the moment it is possible to apply external JAXB customizations to WADL grammars however it is not possible yet to restrict a given customization to a specific WADL document or explicitly inlined schema. Linking binding to external schemas works, for example, the following bindings file can be used:</p>
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[
-&lt;jaxb:bindings version=&quot;2.0&quot;
+</div></div><p>Note 'tMap', 'repMap', 'noTypes' and 'inheritResourceParams' options are supported starting from CXF 2.6.3, 'noVoidForEmptyResponses' - from 2.6.4, '-async' - from 2.7.1, '-xjc' - from 2.7.4</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"><p>Option</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Interpretation</p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>-?</code>,<code>-h</code>,<code>-help</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Displays the online help for this utility and exits.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>-p PackageName</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Specifies the package name of root resource classes</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>-sp [ schema-nam
 espace= ] PackageName</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Specifies one or more package names corresponding to individual schema namespaces</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>-resource RootResourceName</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Specifies a full name of root resource class if WADL contains a single resource</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>-interface</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Default option unless -impl option is used - Java interfaces with JAX-RS annotations are generated</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>-impl</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Generates starting implementation code. Can also be used with -interface option</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>-noTypes</code></p></t
 d><td colspan="1" rowspan="1" class="confluenceTd"><p>Requests that no schema generation is needed. Can also be used with -tMap option</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>-tMap schema-type=java-type</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Provides mapping between schema elements and java types</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>-repMap media-type=java-type</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Provides mapping between media types and java types</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>-b binding-name</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Specifies JAXB binding files. Use multiple -b flags to specify multiple entries.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>-catalog catalog-file-name</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Speci
 fies catalog file to map referenced wadl/schemas</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>-d output-directory</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Specifies the directory into which the generated code files are written.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>-compile</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Compiles generated Java files.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>-classdir compile-class-dir</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Specifies the directory into which the compiled class files are written.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>-noVoidForEmptyResponses</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Generate JAX-RS Response instead of 'void' for methods with no response representations.</p></td></tr><tr><td colspan="1"
  rowspan="1" class="confluenceTd"><p><code>-inheritResourceParams</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Get current resource-level path or matrix parameters added to generated methods for all descendant resources.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>-generateEnums</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Generates Java enums for parameters with options.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>-supportMultipleXmlReps</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Generates separate method for every XML representation in a single WADL request element.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>-async methodNames</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Adds JAX-RS 2.0 AsyncResponse parameter to generated methods, methodNames is a comma-separated list of WADL method name or id attri
 butes</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>-xjc&lt;xjc args&gt;</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Specifies a comma separated list of arguments that are passed directly to the XJC processor, example -xjc-Xts.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><em>wadlurl</em></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The path and name of the WADL file to use in generating the code.</p></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 g
 iven 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 id="JAXRSServicesDescription-JAXBcustomizations">JAXB customizations</h3><p>At the moment it is possible to apply external JAXB customizations to WADL grammars however it is not possible yet to restrict a given customization to a specific WADL document or explicitly inlined schema. Linking binding to external schemas works, for example, the following bindings file can be used:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[&lt;jaxb:bindings version=&quot;2.0&quot;
 	xmlns:jaxb=&quot;http://java.sun.com/xml/ns/jaxb&quot;
 	xmlns:xs=&quot;http://www.w3.org/2001/XMLSchema&quot;
 	schemaLocation=&quot;schemas/book.xsd&quot;
@@ -372,25 +264,13 @@ Alternatively, in combination with a '-n
 	&lt;jaxb:property name=&quot;book2Id&quot;/&gt;
 &lt;/jaxb:bindings&gt;
 ]]></script>
-</div></div> 
-
-<h2 id="JAXRSServicesDescription-wadl2javaMavenplugin">wadl2java Maven plugin</h2>
-
-<p>If you need the code generated during Maven build then the following plugin can be used:</p>
-
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[
-&lt;groupId&gt;org.apache.cxf&lt;/groupId&gt;
+</div></div><h2 id="JAXRSServicesDescription-wadl2javaMavenplugin">wadl2java Maven plugin</h2><p>If you need the code generated during Maven build then the following plugin can be used:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[&lt;groupId&gt;org.apache.cxf&lt;/groupId&gt;
 &lt;artifactId&gt;cxf-wadl2java-plugin&lt;/artifactId&gt;
 &lt;version&gt;2.4.1&lt;/version&gt;
 ]]></script>
-</div></div>
-
-<p>Add this plugin to the build section of your project's pom and specify a 'wadl2java' goal, for example:</p>
-
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[
-&lt;build&gt;
+</div></div><p>Add this plugin to the build section of your project's pom and specify a 'wadl2java' goal, for example:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[&lt;build&gt;
         &lt;plugins&gt;
             &lt;plugin&gt;
                 &lt;groupId&gt;org.apache.cxf&lt;/groupId&gt;
@@ -424,15 +304,8 @@ Alternatively, in combination with a '-n
         &lt;/plugins&gt;
     &lt;/build&gt;
 ]]></script>
-</div></div>
-
-<p>Note that the minimum and maximum memory limits may need to be increased when using the plugin to process large WADL documents, for example, add "-Xms512M -Xmx1024M" to the list of Maven options.</p>
-
-<p>CXF will generate artifacts in the &lt;sourceRoot&gt; directory. Configuration arguments which are included inside the &lt;wadlOption&gt; element are used to pass arguments to the tooling and correspond to the options outlined in the wadltojava section, they can be specified explicitly, as above, or using an "extraargs" wrapper, for example:</p>
-
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[
-&lt;wadlOptions&gt;
+</div></div><p>Note that the minimum and maximum memory limits may need to be increased when using the plugin to process large WADL documents, for example, add "-Xms512M -Xmx1024M" to the list of Maven options.</p><p>CXF will generate artifacts in the &lt;sourceRoot&gt; directory. Configuration arguments which are included inside the &lt;wadlOption&gt; element are used to pass arguments to the tooling and correspond to the options outlined in the wadltojava section, they can be specified explicitly, as above, or using an "extraargs" wrapper, for example:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[&lt;wadlOptions&gt;
 	&lt;wadlOption&gt;
 		&lt;wadl&gt;$\{basedir}/src/main/wadl/bookStore.wadl&lt;/wsdl&gt;
                 &lt;extraargs&gt;
@@ -442,71 +315,27 @@ Alternatively, in combination with a '-n
 	&lt;/wadlOption&gt;
 &lt;/wadlOptions&gt;
 ]]></script>
-</div></div>
-
-<h2 id="JAXRSServicesDescription-Integration">Integration</h2>
-
-<p>Two options are available to developers who wish to integrate CXF JAX-RS WADLToJava code generator.<br clear="none">
-First option is to pass the collected options directly to a wadltojava process. </p>
-
-<p>Another approach is to use org.apache.cxf.tools.wadlto.jaxrs.JAXRSContainer class shipped with the cxf-tools-wadlto-jaxrs module:</p>
-
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[
-&lt;groupId&gt;org.apache.cxf&lt;/groupId&gt;
+</div></div><h2 id="JAXRSServicesDescription-Integration">Integration</h2><p>Two options are available to developers who wish to integrate CXF JAX-RS WADLToJava code generator.<br clear="none"> First option is to pass the collected options directly to a wadltojava process.</p><p>Another approach is to use org.apache.cxf.tools.wadlto.jaxrs.JAXRSContainer class shipped with the cxf-tools-wadlto-jaxrs module:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[&lt;groupId&gt;org.apache.cxf&lt;/groupId&gt;
 &lt;artifactId&gt;cxf-tools-wadlto-jaxrs&lt;/artifactId&gt;
 &lt;version&gt;2.4.1&lt;/version&gt;
 ]]></script>
-</div></div>
-
-<p>Please see CXF source for more details and org.apache.cxf.tools.wadlto.jaxrs.JAXRSContainerTest in particular. </p>
-
-<h2 id="JAXRSServicesDescription-ExternalWADLdocumentsandJAXRSendpoints.">External WADL documents and JAXRS endpoints.</h2>
-
-<p>External WADL documents can be linked to from jaxrs:server endpoints using newly introduced "docLocation" attribute, for example:</p>
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[
-&lt;jaxrs:server address=&quot;/rest&quot; docLocation=&quot;wadl/bookStore.wadl&quot;&gt;
+</div></div><p>Please see CXF source for more details and org.apache.cxf.tools.wadlto.jaxrs.JAXRSContainerTest in particular.</p><h2 id="JAXRSServicesDescription-ExternalWADLdocumentsandJAXRSendpoints.">External WADL documents and JAXRS endpoints.</h2><p>External WADL documents can be linked to from jaxrs:server endpoints using newly introduced "docLocation" attribute, for example:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[&lt;jaxrs:server address=&quot;/rest&quot; docLocation=&quot;wadl/bookStore.wadl&quot;&gt;
    &lt;jaxrs:serviceBeans&gt;
       &lt;bean class=&quot;org.bar.generated.BookStore&quot;/&gt; 
    &lt;/jaxrs:serviceBeans&gt;
 &lt;/jaxrs:server&gt;
 ]]></script>
-</div></div>
-
-<p>If external WADL documents include external schemas and jaxrs endpoints need to have the schema validation enabled, then those schemas can be referenced in the jaxrs:schemaLocations section as well.</p>
-
-<h1 id="JAXRSServicesDescription-WADLAutoGeneration">WADL Auto Generation</h1>
-
-<p>Note that in CXF 3.0.0  WADL Generator code has been moved to</p>
-
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[
-&lt;dependency&gt;
+</div></div><p>If external WADL documents include external schemas and jaxrs endpoints need to have the schema validation enabled, then those schemas can be referenced in the jaxrs:schemaLocations section as well.</p><h1 id="JAXRSServicesDescription-WADLAutoGenerationatRuntime">WADL Auto Generation at Runtime</h1><p>Note that in CXF 3.0.0 WADL Generator code has been moved to</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[&lt;dependency&gt;
   &lt;groupId&gt;org.apache.cxf&lt;/groupId&gt;
   &lt;artifactId&gt;cxf-rt-rs-service-description&lt;/artifactId&gt;
   &lt;version&gt;3.0.0-milestone1&lt;/version&gt;
 &lt;/dependency&gt;
 ]]></script>
-</div></div>
-
-
-<p>CXF JAX-RS supports the auto-generation of WADL for JAX-RS endpoints. <br clear="none">
-Note that JAX-RS subresources are late-resolved by default, so using annotated interfaces for subresources and a staticSubresourceResolution=true property will let the whole resource tree/graph be described in a generated instance. Schemas will be generated for JAXB-annotated types. See below for the information on how to get auto-generated WADL instances reference existing schemas.</p>
-
-<p><strong>CXF 2.4.0</strong>: org.apache.cxf.jaxrs.ext.Description and org.apache.cxf.jaxrs.ext.xml.XMLName have been moved to org.apache.cxf.jaxrs.model.wadl package given that their purpose is to improve the WADL generation. Also, org.apache.cxf.jaxrs.model.wadl.WadlElement has been renamed to 'ElementClass'. </p>
-
-<h2 id="JAXRSServicesDescription-DocumentingresourceclassesandmethodsingeneratedWADL">Documenting resource classes and methods in generated WADL</h2>
-
-<p>WADL documents can include <a shape="rect" class="external-link" href="http://www.w3.org/Submission/wadl/#x3-80002.3" rel="nofollow">doc</a> fragments. </p>
-
-<p>Users may want to use <a shape="rect" class="external-link" href="http://svn.apache.org/repos/asf/cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/model/wadl/Description.java">Description</a> annotations which can be attached to resource classes and methods.</p>
-
-<p>Note that starting from CXF 2.4.0, Description annotations can be applied to input parameters. Additionally, a method-level <a shape="rect" class="external-link" href="http://svn.apache.org/repos/asf/cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/model/wadl/Descriptions.java">Descriptions</a> annotation can have a collection of categorized Description annotations, with each Description targeting a specific WADL element by setting its 'target' property to one of the <a shape="rect" class="external-link" href="http://svn.apache.org/repos/asf/cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/model/wadl/DocTarget.java">DocTarget</a> values. For example, one can use a Descriptions annotation to document the response representation of a particular resource method, as well as add documentation fragments to WADL wadl:method/wadl:request and wadl:method/wadl:response elements:</p>
-
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
-@POST
+</div></div><p>CXF JAX-RS supports the auto-generation of WADL for JAX-RS endpoints. <br clear="none"> Note that JAX-RS subresources are late-resolved by default, so using annotated interfaces for subresources and a staticSubresourceResolution=true property will let the whole resource tree/graph be described in a generated instance. Schemas will be generated for JAXB-annotated types. See below for the information on how to get auto-generated WADL instances reference existing schemas.</p><p><strong>CXF 2.4.0</strong>: org.apache.cxf.jaxrs.ext.Description and org.apache.cxf.jaxrs.ext.xml.XMLName have been moved to org.apache.cxf.jaxrs.model.wadl package given that their purpose is to improve the WADL generation. Also, org.apache.cxf.jaxrs.model.wadl.WadlElement has been renamed to 'ElementClass'.</p><h2 id="JAXRSServicesDescription-DocumentingresourceclassesandmethodsingeneratedWADL">Documenting resource classes and methods in generated WADL</h2><p>WADL documents can include <a shape=
 "rect" class="external-link" href="http://www.w3.org/Submission/wadl/#x3-80002.3" rel="nofollow">doc</a> fragments.</p><p>Users may want to use <a shape="rect" class="external-link" href="http://svn.apache.org/repos/asf/cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/model/wadl/Description.java">Description</a> annotations which can be attached to resource classes and methods.</p><p>Note that starting from CXF 2.4.0, Description annotations can be applied to input parameters. Additionally, a method-level <a shape="rect" class="external-link" href="http://svn.apache.org/repos/asf/cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/model/wadl/Descriptions.java">Descriptions</a> annotation can have a collection of categorized Description annotations, with each Description targeting a specific WADL element by setting its 'target' property to one of the <a shape="rect" class="external-link" href="http://svn.apache.org/repos/asf/cxf/trunk/rt/frontend/jaxrs/src/ma
 in/java/org/apache/cxf/jaxrs/model/wadl/DocTarget.java">DocTarget</a> values. For example, one can use a Descriptions annotation to document the response representation of a particular resource method, as well as add documentation fragments to WADL wadl:method/wadl:request and wadl:method/wadl:response elements:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[@POST
 @Path(&quot;books/{bookid}&quot;)
 @Descriptions({ 
    @Description(value = &quot;Adds a new book&quot;, target = DocTarget.METHOD),
@@ -517,13 +346,8 @@ Note that JAX-RS subresources are late-r
 })
 public Book addBook(@Description(&quot;book id&quot;) @PathParam(&quot;id&quot;) Long id, @Description(&quot;New Book&quot;) Book book) {...}
 ]]></script>
-</div></div>
-
-<p>Every unique @Path value adds a new 'resource' element to the generated WADL, thus the last Description annotation in the @Descriptions array ensures the doc extension is also added to the 'resource' element. Note that multiple resource methods having different HTTP methods but sharing the same @Path value will have the same parent 'resource' element representing this shared path fragment, in this case a Description with the DocTarget.RESOURCE target will be ignored unless it is added to the first resource method with this shared @Path:</p>
-
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
-@POST
+</div></div><p>Every unique @Path value adds a new 'resource' element to the generated WADL, thus the last Description annotation in the @Descriptions array ensures the doc extension is also added to the 'resource' element. Note that multiple resource methods having different HTTP methods but sharing the same @Path value will have the same parent 'resource' element representing this shared path fragment, in this case a Description with the DocTarget.RESOURCE target will be ignored unless it is added to the first resource method with this shared @Path:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[@POST
 @Path(&quot;books/{bookid}&quot;)
 @Description(value = &quot;Resource&quot;, target = DocTarget.RESOURCE),
 public Book addBook(@Description(&quot;book id&quot;) @PathParam(&quot;id&quot;) Long id, @Description(&quot;New Book&quot;) Book book) {...}
@@ -532,152 +356,89 @@ public Book addBook(@Description(&quot;b
 @Path(&quot;books/{bookid}&quot;)
 public Book addBook(@Description(&quot;book id&quot;) @PathParam(&quot;id&quot;) Long id) {...}
 ]]></script>
-</div></div>
-
-
-<h2 id="JAXRSServicesDescription-CustomizingWADLGeneration">Customizing WADL Generation</h2>
-
-<p>One can register a custom WadlGenerator as a jaxrs:provider. The custom generator can extend the default <br clear="none">
-org.apache.cxf.jaxrs.model.wadl.WadlGenerator or register a default one with one of the following properties set.</p>
-
-<ul class="alternate"><li>wadlNamespace: default is "http://wadl.dev.java.net/2009/02", the earlier one is "http://research.sun.com/wadl/2006/10".</li><li>singleResourceMultipleMethods: default is 'true', for example, if a resource class has multiple methods supported at the same path such as "/" (GET, POST, etc) then WADL will list them all as the child nodes of a single resource element.</li><li>useSingleSlashResource: default is false, for example, if you have a root resource class with a path "root" and a resource method with a path "" or "/" then a WADL resource representing the root will not have a child resource representing this resource method (it would do if a resource method had a more specific path such as "bar").</li></ul>
-
-
-<p>Starting from CXF 2.4.1 and 2.3.5 the following properties are also supported:</p>
-
-<ul class="alternate"><li>applicationTitle: can be used to create an application title.</li><li>namespacePrefix: defaut is 'prefix', it can be set to other value such as 'ns'.</li><li>ignoreForwardSlash: can be used to enforce that resource path values do not start from '/'</li><li>addResourceAndMethodIds: WadlGenerator will add "id" attributes to wadl:resource and wadl:method elements</li></ul>
-
-
-<p>An <a shape="rect" class="external-link" href="http://svn.apache.org/repos/asf/cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/model/wadl/ElementClass.java">ElementClass</a> annotation can help with representing JAX-RS Response elements in the generated WADL. </p>
-
-<h3 id="JAXRSServicesDescription-RepresentingexplicitJAXBcollections">Representing explicit JAXB collections</h3>
-
-<p>Starting from CXF 2.5.5 and 2.6.2 it is possible to get explicit collections represented in generated WADL grammar sections and have WADL representations linking to these schema elements. Note it is only possible for JAXB collections, for example:</p>
-
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
-
-@GET
+</div></div><h3 id="JAXRSServicesDescription-SupportforJavadoc">Support for Javadoc</h3><p>In CXF 3.0.0 one can get the Javadoc documentation copied to WADL being auto-generated at runtime.</p><p>org.apache.cxf.jaxrs.model.wadl.JavaDocProvider implements org.apache.cxf.jaxrs.model.wadl.DocumentationProvider and can be set as WADLGenerator "documentationProvider" property.</p><p>JavaDocProvider can be customized with URL or relative String path pointing to the generated Javadoc jar, so this jar can be shipped in the application war or located elsewhere.</p><p>JavaDocProvider parses the generated Javadoc HTML pages and scrapes the documentation. See Java to Wadl section on the alternative approach for supporting Javadoc.</p><h2 id="JAXRSServicesDescription-CustomizingWADLGeneration">Customizing WADL Generation</h2><p>One can register a custom WadlGenerator as a jaxrs:provider. The custom generator can extend the default <br clear="none"> org.apache.cxf.jaxrs.model.wadl.WadlGenerator o
 r register a default one with one of the following properties set.</p><ul class="alternate"><li>wadlNamespace: default is "http://wadl.dev.java.net/2009/02", the earlier one is "http://research.sun.com/wadl/2006/10".</li><li>singleResourceMultipleMethods: default is 'true', for example, if a resource class has multiple methods supported at the same path such as "/" (GET, POST, etc) then WADL will list them all as the child nodes of a single resource element.</li><li>useSingleSlashResource: default is false, for example, if you have a root resource class with a path "root" and a resource method with a path "" or "/" then a WADL resource representing the root will not have a child resource representing this resource method (it would do if a resource method had a more specific path such as "bar").</li></ul><p>Starting from CXF 2.4.1 and 2.3.5 the following properties are also supported:</p><ul class="alternate"><li>applicationTitle: can be used to create an application title.</li><li>n
 amespacePrefix: defaut is 'prefix', it can be set to other value such as 'ns'.</li><li>ignoreForwardSlash: can be used to enforce that resource path values do not start from '/'</li><li>addResourceAndMethodIds: WadlGenerator will add "id" attributes to wadl:resource and wadl:method elements</li></ul><p>An <a shape="rect" class="external-link" href="http://svn.apache.org/repos/asf/cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/model/wadl/ElementClass.java">ElementClass</a> annotation can help with representing JAX-RS Response elements in the generated WADL.</p><h3 id="JAXRSServicesDescription-RepresentingexplicitJAXBcollections">Representing explicit JAXB collections</h3><p>Starting from CXF 2.5.5 and 2.6.2 it is possible to get explicit collections represented in generated WADL grammar sections and have WADL representations linking to these schema elements. Note it is only possible for JAXB collections, for example:</p><div class="code panel pdl" style="border-width:
  1px;"><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[@GET
 @Path(&quot;books&quot;)
 @org.apache.cxf.jaxrs.model.wadl.XMLName(&quot;{http://books}books&quot;)
 public List&lt;Book&gt; getBooks() {...}
 ]]></script>
-</div></div>
-
-<p>Given the above example, WADLGenerator will attempt to add a 'books' element to the generated schema with the targetNamespace set to "http://books". This 'books' element will have a sequence of elements linking to a type representing the "Book" class.</p>
-
-<h3 id="JAXRSServicesDescription-RepresentingexternalschemasandnonJAXBtypes">Representing external schemas and non JAXB types</h3>
-
-<p>By default, the WADL grammar section will be properly generated if resource methods accept or return JAXB types. </p>
-
-<p>Even when you do use JAXB, the JAXB types may have been generated from the external schema so having WadlGenerator attempting to recreate the original schema may not work well. To have a generated WADL referencing the original schema(s) please set a 'schemaLocations' list property (programmatically or from Spring) :</p>
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
-WadlGenerator wg = new WadlGenerator();
+</div></div><p>Given the above example, WADLGenerator will attempt to add a 'books' element to the generated schema with the targetNamespace set to "http://books". This 'books' element will have a sequence of elements linking to a type representing the "Book" class.</p><h3 id="JAXRSServicesDescription-RepresentingexternalschemasandnonJAXBtypes">Representing external schemas and non JAXB types</h3><p>By default, the WADL grammar section will be properly generated if resource methods accept or return JAXB types.</p><p>Even when you do use JAXB, the JAXB types may have been generated from the external schema so having WadlGenerator attempting to recreate the original schema may not work well. To have a generated WADL referencing the original schema(s) please set a 'schemaLocations' list property (programmatically or from Spring) :</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[WadlGenerator wg = new WadlGenerator();
 wg.setSchemaLocations(Collections.singletonList(&quot;classpath:/book.xsd&quot;));
 ]]></script>
-</div></div> 
-
-<p>In this case the grammar section will have the 'book.xsd' schema inlined. If this schema imports other schemas then the imports with relative URIs will be replaced by the absolute URIs based on the current endpoint's base address. For example, if the endpoint address is "http://somehost/bar" and the 'book.xsd' imports "foo/book1.xsd" then the published WADL will contain an "http://somehost/bar/foo/book1.xsd". At the moment a custom RequestHandler filter will have to be registered to serve resources such as "http://somehost/bar/foo/book1.xsd" which can 'calculate' which resource is required get the absolute request URI and comparing it with the base URI, possibly with the help of the injected JAXRS UriInfo context. Alternatively, resources such as book1.xsd may be served by CXFServlet itself (see the Redirection with CXFServlet)  </p>
-
-<p>TODO : add ignoreImports flag so that users can list root and imported schemas in "schemaLocations" and have them all inlined.</p>
-
-<p>Note that the root schema such as "book.xsd" is inlined - you can have it referenced only by setting an 'externalLinks' list property. This will work very well when the "book.xsd" is indeed available at the external URI, but this property can also be used to avoid the local schemas being inlined. Moreover, the use of JAXB will not be required. The result will look like this:</p>
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[
-&lt;wadl:grammars&gt;
+</div></div><p>In this case the grammar section will have the 'book.xsd' schema inlined. If this schema imports other schemas then the imports with relative URIs will be replaced by the absolute URIs based on the current endpoint's base address. For example, if the endpoint address is "http://somehost/bar" and the 'book.xsd' imports "foo/book1.xsd" then the published WADL will contain an "http://somehost/bar/foo/book1.xsd". At the moment a custom RequestHandler filter will have to be registered to serve resources such as "http://somehost/bar/foo/book1.xsd" which can 'calculate' which resource is required get the absolute request URI and comparing it with the base URI, possibly with the help of the injected JAXRS UriInfo context. Alternatively, resources such as book1.xsd may be served by CXFServlet itself (see the Redirection with CXFServlet)</p><p>TODO : add ignoreImports flag so that users can list root and imported schemas in "schemaLocations" and have them all inlined.</p><p>Not
 e that the root schema such as "book.xsd" is inlined - you can have it referenced only by setting an 'externalLinks' list property. This will work very well when the "book.xsd" is indeed available at the external URI, but this property can also be used to avoid the local schemas being inlined. Moreover, the use of JAXB will not be required. The result will look like this:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[&lt;wadl:grammars&gt;
 &lt;wadl:include href=&quot;http://books.xsd&quot;/&gt;
 &lt;/wadl:grammars&gt;
 ]]></script>
-</div></div> 
-
-<p>Note that "schemaLocations" and "externalLinks" properties differ in that the schemas referenced by the former one are inlined.</p>
-
-<p>You can also customize the way schema elements are referenced. When WadlGenerator creates WADL representation elements (representing resource method input or output types) it will be able to link to schema elements provided a given type is actually a JAXB one, so the result may look like this :</p>
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[
-&lt;!-- 
+</div></div><p>Note that "schemaLocations" and "externalLinks" properties differ in that the schemas referenced by the former one are inlined.</p><p>You can also customize the way schema elements are referenced. When WadlGenerator creates WADL representation elements (representing resource method input or output types) it will be able to link to schema elements provided a given type is actually a JAXB one, so the result may look like this :</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[&lt;!-- 
   thebook2 element is declared in a schema inlined in or referenced from the grammar section
   prefix1 is bound to that schema&#39;s target namespace and is declared at the wadl:application element 
 --&gt;
 &lt;representation mediaType=&quot;application/xml&quot; element=&quot;prefix1:thebook2&quot;/&gt;
 ]]></script>
-</div></div>
-
-<p>If no JAXB is used then you can attach an <a shape="rect" class="external-link" href="http://svn.apache.org/repos/asf/cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/model/wadl/XMLName.java">XMLName</a> annotation to method input or output types. Alternatively, you can register an instance of <a shape="rect" class="external-link" href="http://svn.apache.org/repos/asf/cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/model/wadl/ElementQNameResolver.java">ElementQNameResolver</a> with the WadlGenerator which will be used for creating wadl:representation/@element values.</p>
-
-<h3 id="JAXRSServicesDescription-Changingthebaseaddress">Changing the base address</h3>
-
-<p>Starting from CXF 2.6.2 it is possible to affect the base address specified in the auto-generated WADL (in wadl:resources/@base attribute).<br clear="none">
-WADLGenerator can be indirectly configured by setting a jaxrs:server/@publishedEndpointUrl attribute, similarly to the way CXF WSDL generator can be configured by setting a jaxws:endpoint/@publishedEndpointUrl attribute.</p>
-
-<h1 id="JAXRSServicesDescription-ServicelistingsandWADLqueries">Service listings and WADL queries</h1>
-
-<p>Links to WADL instances for RESTful endpoints are available from {base endpointaddress}/services, in addition to SOAP endpoints if any. </p>
-
-<p>For example, given</p>
-
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[
-Base address : &#39;http://localhost:8080&#39;
+</div></div><p>If no JAXB is used then you can attach an <a shape="rect" class="external-link" href="http://svn.apache.org/repos/asf/cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/model/wadl/XMLName.java">XMLName</a> annotation to method input or output types. Alternatively, you can register an instance of <a shape="rect" class="external-link" href="http://svn.apache.org/repos/asf/cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/model/wadl/ElementQNameResolver.java">ElementQNameResolver</a> with the WadlGenerator which will be used for creating wadl:representation/@element values.</p><h3 id="JAXRSServicesDescription-Changingthebaseaddress">Changing the base address</h3><p>Starting from CXF 2.6.2 it is possible to affect the base address specified in the auto-generated WADL (in wadl:resources/@base attribute).<br clear="none"> WADLGenerator can be indirectly configured by setting a jaxrs:server/@publishedEndpointUrl attribute, similarly to the way CXF WS
 DL generator can be configured by setting a jaxws:endpoint/@publishedEndpointUrl attribute.</p><h1 id="JAXRSServicesDescription-java2wadlMavenplugin">java2wadl Maven plugin</h1><p>CXF 3.0.0 and 2.7.11 introduce java2wadl plugin for generating WADL at the build time:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[&lt;groupId&gt;org.apache.cxf&lt;/groupId&gt;
+&lt;artifactId&gt;cxf-java2wadl-plugin&lt;/artifactId&gt;
+&lt;version&gt;3.0.0&lt;/version&gt;
+]]></script>
+</div></div><p>Add this plugin to the build section of your project's pom, for example:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[&lt;build&gt;
+     &lt;plugins&gt;
+            
+       &lt;plugin&gt;
+                &lt;groupId&gt;org.apache.cxf&lt;/groupId&gt;
+                &lt;artifactId&gt;cxf-java2wadl-plugin&lt;/artifactId&gt;
+                &lt;version&gt;3.0.0&lt;/version&gt;
+                &lt;executions&gt;
+                    &lt;!-- Enable if support for Javadoc is required, not supported in CXF 2.7.11 --&gt;
+                    &lt;!--
+                    &lt;execution&gt;
+                        &lt;id&gt;parsejavadoc&lt;/id&gt;
+                        &lt;phase&gt;generate-sources&lt;/phase&gt;
+                        &lt;goals&gt;
+                            &lt;goal&gt;parsejavadoc&lt;/goal&gt;
+                        &lt;/goals&gt;
+                    &lt;/execution&gt;
+                    --&gt;
+                    &lt;execution&gt;
+                        &lt;id&gt;process-classes&lt;/id&gt;
+                        &lt;phase&gt;process-classes&lt;/phase&gt;
+                        &lt;goals&gt;
+                            &lt;goal&gt;java2wadl&lt;/goal&gt;
+                        &lt;/goals&gt;
+                        &lt;configuration&gt;
+                            &lt;classResourceNames&gt;
+                                    &lt;classResourceName&gt;a.b.c.CustomerService&lt;/classResourceName&gt;
+                            &lt;/classResourceNames&gt;
+                            &lt;!-- Enable if support for Javadoc is required, not supported in CXF 2.7.11 --&gt;
+                            &lt;!--
+                            &lt;docProvider&gt;org.apache.cxf.maven_plugin.javatowadl.ResourceMapJavaDocProvider&lt;/docProvider&gt;
+                            --&gt;
+                            &lt;attachWadl&gt;true&lt;/attachWadl&gt;
+                        &lt;/configuration&gt;
+                    &lt;/execution&gt;
+                &lt;/executions&gt;
+            &lt;/plugin&gt;
+        &lt;/plugins&gt;
+    &lt;/build&gt;
+]]></script>
+</div></div><p>Note that Javadoc can be properly supported by enabling the "parsejavadoc" execution and a docProvider property.</p><h1 id="JAXRSServicesDescription-ServicelistingsandWADLqueries">Service listings and WADL queries</h1><p>Links to WADL instances for RESTful endpoints are available from {base endpointaddress}/services, in addition to SOAP endpoints if any.</p><p>For example, given</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[Base address : &#39;http://localhost:8080&#39;
 WAR name : &#39;store&#39;
 CXFServlet : &#39;/books/*&#39;
 jaxrs:server/@address = &#39;/orders&#39;
 ]]></script>
-</div></div>
-
-<p>and visiting</p>
-
-<p>&gt; <a shape="rect" class="external-link" href="http://localhost:8080/store/books" rel="nofollow">http://localhost:8080/store/books</a> <br clear="none">
-&gt; <a shape="rect" class="external-link" href="http://localhost:8080/store/books/services" rel="nofollow">http://localhost:8080/store/books/services</a> </p>
-
-<p>will let you see all the WADL links.</p>
-
-<p>Note that you can override the location at which listings are provided (in case you would like '/services' be available to your resources) using 'service-list-path' CXFServlet parameter, example:</p>
-
-<p>&gt; 'service-list-path' = '/listings'</p>
-
-<p>Going to the service listings page is not the only way to see WADL instances, one can also get it using a ?_wadl query.</p>
-
-
-<p>&gt; <a shape="rect" class="external-link" href="http://localhost:8080/store/books/orders?_wadl" rel="nofollow">http://localhost:8080/store/books/orders?_wadl</a></p>
-
-<p>will give you the description of all the root resource classes registered<br clear="none">
-with a given jaxrs:server endpoint. </p>
-
-<p>For example, if the following 2 root resource classes has been registered with this endpoint:</p>
-
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
-@Path(&quot;/fiction&quot;) 
+</div></div><p>and visiting</p><p>&gt; <a shape="rect" class="external-link" href="http://localhost:8080/store/books" rel="nofollow">http://localhost:8080/store/books</a> <br clear="none"> &gt; <a shape="rect" class="external-link" href="http://localhost:8080/store/books/services" rel="nofollow">http://localhost:8080/store/books/services</a></p><p>will let you see all the WADL links.</p><p>Note that you can override the location at which listings are provided (in case you would like '/services' be available to your resources) using 'service-list-path' CXFServlet parameter, example:</p><p>&gt; 'service-list-path' = '/listings'</p><p>Going to the service listings page is not the only way to see WADL instances, one can also get it using a ?_wadl query.</p><p>&gt; <a shape="rect" class="external-link" href="http://localhost:8080/store/books/orders?_wadl" rel="nofollow">http://localhost:8080/store/books/orders?_wadl</a></p><p>will give you the description of all the root resource classes
  registered<br clear="none"> with a given jaxrs:server endpoint.</p><p>For example, if the following 2 root resource classes has been registered with this endpoint:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[@Path(&quot;/fiction&quot;) 
 public class FictionBookOrders {
 }
 @Path(&quot;/sport&quot;) 
 public class SportBookOrders {
 }
 ]]></script>
-</div></div>
-
-<p>then WADL will contain the description of both FictionBookOrders and SportBookOrders resources.</p>
-
-<p>&gt; <a shape="rect" class="external-link" href="http://localhost:8080/store/books/orders/fiction?_wadl" rel="nofollow">http://localhost:8080/store/books/orders/fiction?_wadl</a><br clear="none">
-&gt; <a shape="rect" class="external-link" href="http://localhost:8080/store/books/orders/sport?_wadl" rel="nofollow">http://localhost:8080/store/books/orders/sport?_wadl</a></p>
-
-<p>will give you all the info for FictionBookOrders and SportBookOrders respectively.</p>
-
-<p><strong>Note</strong> that WadlGenerator will return an existing WADL document instead of auto-generating a new one if jaxrs:server/@docLocation attribute has been set.</p>
-
-<p>By default, starting from CXF 2.5.1 and 2.4.5, the media type for a ?_wadl response is set to application/xml which is to do with the fact that Firefox does not really like 'application/vnd.sun.wadl+xml' unless some wadl plugin is registered. If HTTP Content-Type is set to 'application/xml' then Firefox will show it with no problems. </p>
-
-<p>You can easily customize what Content-Type is set by either using a WadlGenerator 'defaultMediaType' property  or using the extension mappings and adding a .wadl at the end of request URI instead of using a _wadl query: "http://localhost:8080/store/books/orders/fiction.wadl", where extensions will map a 'wadl' to 'application/vnd.sun.wadl+xml' or indeed to 'application/xml'.</p>
-
-<h1 id="JAXRSServicesDescription-WADLinJSONformat">WADL in JSON format</h1>
-
-<p>Use a "?_wadl&amp;_type=json" or something like "fiction.wadl", where extensions will map a 'wadl' to 'application/json' in order to get a WADL JSON representations, please see <a shape="rect" class="external-link" href="http://sberyozkin.blogspot.com/2011/10/describing-json-services-in-wadl.html" rel="nofollow">this blog entry</a> for more information.</p>
-
-<h1 id="JAXRSServicesDescription-HidinglinkstoJAXRSendpointsfromtheservicespage">Hiding links to JAXRS endpoints from the services page </h1>
-
-<p>In some cases you may not want the users to see the links to some JAXRS endpoints. For example, if you have an AtomPullServer endpoint collecting the log entries for a number of application endpoints, you may not want to see AtomPullServer endpoint being listed among the endpoints representing the actual application and which users are actually interested in. If so then adding an "org.apache.cxf.endpoint.private" boolean property with a value "true" will do the trick; note the same property can be used by jaxws endpoints.</p></div>
+</div></div><p>then WADL will contain the description of both FictionBookOrders and SportBookOrders resources.</p><p>&gt; <a shape="rect" class="external-link" href="http://localhost:8080/store/books/orders/fiction?_wadl" rel="nofollow">http://localhost:8080/store/books/orders/fiction?_wadl</a><br clear="none"> &gt; <a shape="rect" class="external-link" href="http://localhost:8080/store/books/orders/sport?_wadl" rel="nofollow">http://localhost:8080/store/books/orders/sport?_wadl</a></p><p>will give you all the info for FictionBookOrders and SportBookOrders respectively.</p><p><strong>Note</strong> that WadlGenerator will return an existing WADL document instead of auto-generating a new one if jaxrs:server/@docLocation attribute has been set.</p><p>By default, starting from CXF 2.5.1 and 2.4.5, the media type for a ?_wadl response is set to application/xml which is to do with the fact that Firefox does not really like 'application/vnd.sun.wadl+xml' unless some wadl plugin is register
 ed. If HTTP Content-Type is set to 'application/xml' then Firefox will show it with no problems.</p><p>You can easily customize what Content-Type is set by either using a WadlGenerator 'defaultMediaType' property or using the extension mappings and adding a .wadl at the end of request URI instead of using a _wadl query: "http://localhost:8080/store/books/orders/fiction.wadl", where extensions will map a 'wadl' to 'application/vnd.sun.wadl+xml' or indeed to 'application/xml'.</p><h1 id="JAXRSServicesDescription-WADLinJSONformat">WADL in JSON format</h1><p>Use a "?_wadl&amp;_type=json" or something like "fiction.wadl", where extensions will map a 'wadl' to 'application/json' in order to get a WADL JSON representations, please see <a shape="rect" class="external-link" href="http://sberyozkin.blogspot.com/2011/10/describing-json-services-in-wadl.html" rel="nofollow">this blog entry</a> for more information.</p><h1 id="JAXRSServicesDescription-HidinglinkstoJAXRSendpointsfromtheservicespa
 ge">Hiding links to JAXRS endpoints from the services page</h1><p>In some cases you may not want the users to see the links to some JAXRS endpoints. For example, if you have an AtomPullServer endpoint collecting the log entries for a number of application endpoints, you may not want to see AtomPullServer endpoint being listed among the endpoints representing the actual application and which users are actually interested in. If so then adding an "org.apache.cxf.endpoint.private" boolean property with a value "true" will do the trick; note the same property can be used by jaxws endpoints.</p></div>
            </div>
            <!-- Content -->
          </td>



Mime
View raw message