cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From build...@apache.org
Subject svn commit: r917859 - in /websites/production/cxf/content: cache/docs.pageCache docs/jax-rs.html
Date Tue, 29 Jul 2014 19:47:05 GMT
Author: buildbot
Date: Tue Jul 29 19:47:04 2014
New Revision: 917859

Log:
Production update by buildbot for cxf

Modified:
    websites/production/cxf/content/cache/docs.pageCache
    websites/production/cxf/content/docs/jax-rs.html

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

Modified: websites/production/cxf/content/docs/jax-rs.html
==============================================================================
--- websites/production/cxf/content/docs/jax-rs.html (original)
+++ websites/production/cxf/content/docs/jax-rs.html Tue Jul 29 19:47:04 2014
@@ -118,12 +118,12 @@ Apache CXF -- JAX-RS
          <td height="100%">
            <!-- Content -->
            <div class="wiki-content">
-<div id="ConfluenceContent"><p>&#160;</p><p>&#160;</p><p><span style="font-size:2em;font-weight:bold"> JAX-RS (JSR-339) </span></p><p>&#160;</p><p>&#160;</p><p><style type="text/css">/*<![CDATA[*/
-div.rbtoc1400294781239 {padding: 0px;}
-div.rbtoc1400294781239 ul {list-style: disc;margin-left: 0px;}
-div.rbtoc1400294781239 li {margin-left: 0px;padding-left: 0px;}
+<div id="ConfluenceContent"><p>&#160;</p><p>&#160;</p><span style="font-size:2em;font-weight:bold"> JAX-RS (JSR-339) </span><p>&#160;</p><p>&#160;</p><p><style type="text/css">/*<![CDATA[*/
+div.rbtoc1406663198049 {padding: 0px;}
+div.rbtoc1406663198049 ul {list-style: disc;margin-left: 0px;}
+div.rbtoc1406663198049 li {margin-left: 0px;padding-left: 0px;}
 
-/*]]>*/</style></p><div class="toc-macro rbtoc1400294781239">
+/*]]>*/</style></p><div class="toc-macro rbtoc1406663198049">
 <ul class="toc-indentation"><li><a shape="rect" href="#JAX-RS-Introduction">Introduction</a></li><li><a shape="rect" href="#JAX-RS-JAX-RSCompliance">JAX-RS Compliance</a>
 <ul class="toc-indentation"><li><a shape="rect" href="#JAX-RS-1.1">1.1</a></li><li><a shape="rect" href="#JAX-RS-2.0Final">2.0 Final</a></li></ul>
 </li><li><a shape="rect" href="#JAX-RS-Projectsetupandconfiguration">Project setup and configuration</a>
@@ -137,7 +137,7 @@ div.rbtoc1400294781239 li {margin-left: 
 </li><li><a shape="rect" href="#JAX-RS-AdvancedFeatures">Advanced Features</a>
 <ul class="toc-indentation"><li><a shape="rect" href="#JAX-RS-Multiparts">Multiparts</a></li><li><a shape="rect" href="#JAX-RS-SecureJAX-RSservices">Secure JAX-RS services</a></li><li><a shape="rect" href="#JAX-RS-FailoverandLoadDistributionFeatures">Failover and Load Distribution Features</a></li><li><a shape="rect" href="#JAX-RS-Redirection">Redirection</a></li><li><a shape="rect" href="#JAX-RS-XSLTandXPath">XSLT and XPath</a></li><li><a shape="rect" href="#JAX-RS-ComplexSearchQueries">Complex Search Queries</a></li><li><a shape="rect" href="#JAX-RS-Model-View-Controllersupport">Model-View-Controller support</a></li><li><a shape="rect" href="#JAX-RS-CombiningJAX-WSandJAX-RS">Combining JAX-WS and JAX-RS</a></li><li><a shape="rect" href="#JAX-RS-IntegrationwithDistributedOSGi">Integration with Distributed OSGi</a></li><li><a shape="rect" href="#JAX-RS-OtherAdvancedFeatures">Other Advanced Features</a></li></ul>
 </li><li><a shape="rect" href="#JAX-RS-MavenPlugins">Maven Plugins</a></li><li><a shape="rect" href="#JAX-RS-Deployment">Deployment</a></li><li><a shape="rect" href="#JAX-RS-Third-partyprojects">Third-party projects</a></li><li><a shape="rect" href="#JAX-RS-References">References</a></li><li><a shape="rect" href="#JAX-RS-Howtocontribute">How to contribute</a></li></ul>
-</div><h1 id="JAX-RS-Introduction">Introduction</h1><p><a shape="rect" class="external-link" href="http://en.wikipedia.org/wiki/JAX-RS" rel="nofollow">JAX-RS</a>: Java API for RESTful Web Services is a Java programming language API that provides support in creating web services according to the Representational State Transfer (REST) architectural style.</p><p>CXF supports the Java API for RESTful Web Services: JAX-RS 2.0 (<a shape="rect" class="external-link" href="http://jcp.org/en/jsr/detail?id=339" rel="nofollow">JSR-339</a>) and JAX-RS 1.1 (<a shape="rect" class="external-link" href="http://jcp.org/en/jsr/detail?id=311" rel="nofollow">JSR-311</a>).</p><p>CXF 3.0.0 completely implements JAX-RS 2.0 including new Client API and has been fully tested against the first JAX-RS 2.0 TCK which became available to Apache (jaxrstck-2.0_26-Feb-2013).</p><p>Existing JAX-RS 1.1 applications can be run with CXF 3.0.0.</p><p>CXF 2.7.0 supports most of the new features introduced in JAX-RS 2.0 (
 excluding 2.0 Client API for now - but note that CXF client API has been retrofitted to support new filters, interceptors, exception classes and Response API, plus the asynchronous client invoker API).</p><p>CXF 2.6.x supports <a shape="rect" class="external-link" href="https://jsr311.dev.java.net/nonav/releases/1.1/index.html" rel="nofollow">JSR-311 API 1.1</a> and is JAX-RS TCK 1.1 compliant.</p><p>JAX-RS related demos are located under the <a shape="rect" class="external-link" href="http://svn.apache.org/viewvc/cxf/trunk/distribution/src/main/release/samples/jax_rs/">samples/jax_rs </a> directory.</p><p>This documentation will refer to JAX-RS 2.0 (JSR-339) API.</p><p>Outstanding JAX-RS JIRA issues can be found <a shape="rect" class="external-link" href="https://issues.apache.org/jira/secure/IssueNavigator.jspa?reset=true&amp;jqlQuery=project+%3D+CXF+AND+resolution+%3D+Unresolved+AND+component+%3D+JAX-RS+ORDER+BY+priority+DESC&amp;mode=hide">here</a>.</p><h1 id="JAX-RS-JAX-RSCompl
 iance">JAX-RS Compliance</h1><h2 id="JAX-RS-1.1">1.1</h2><p>Apache CXF 2.6.x passes the final JAX-RS 1.1 TCK and is formally 1.1 compliant.</p><p>Please consult the <a shape="rect" class="external-link" href="http://tomee.apache.org/apache-tomee.html">TomEE</a> documentation on the support of Java EE related JAX-RS 1.1 options in its Apache CXF-based JAX-RS runtime.</p><p>CXF 2.7.x and CXF 3.0.0 will fully support and run JAX-RS 1.1 applications but will not pass the JAX-RS 1.1 TCK Signature tests due to</p><p>CXF 2.7.x and CXF 3.0.0 depending on 2.0-m10 and 2.0 final versions of JAX-RS 2.0 API.</p><h2 id="JAX-RS-2.0Final">2.0 Final</h2><p>CXF 3.x has been updated to implement the JAX-RS 2.0 API&#8217;s as completely as possible without access to the final JAX-RS 2.0 TCK. <br clear="none">We have done extensive testing with JAX-RS 2.0 user applications, samples, and the preliminary TCK to make sure CXF&#8217;s implementation is as complete and compatible as we can make it. <br clear
 ="none">CXF makes and will continue making the best possible effort to have JAX-RS 2.0 and new JAX-RS version implementations technically complete and offering an environment for running the portable JAX-RS 2.0 applications.<br clear="none">If the final 2.0 TCK is made available to Apache, we will make sure CXF is updated to pass.<br clear="none">If another TCK licensee that uses CXF&#8217;s JAX-RS 2.0 implementation in their products finds issues with CXF&#8217;s compliance, we are more than happy to fix bugs that are raised.</p><h1 id="JAX-RS-Projectsetupandconfiguration">Project setup and configuration</h1><h2 id="JAX-RS-Migration">Migration</h2><h3 id="JAX-RS-FromJAX-RS1.1to2.0">From JAX-RS 1.1 to 2.0</h3><p>JAX-RS 2.0 is backward compatible with JAX-RS 1.1. Please see <a shape="rect" href="jax-rs-basics.html">JAX-RS Basics</a> for more information about JAX-RS 2.0.</p><p>CXF 2.7.10 and CXF 3.0.0 are expected to support existing JAX-RS 1.1 applications.</p><h3 id="JAX-RS-FromCXF
 2.7.xtoCXF3.0.0">From CXF 2.7.x to CXF 3.0.0</h3><p>Please check the <a shape="rect" href="http://cxf.apache.org/docs/30-migration-guide.html">CXF 3.0.0 Migration Guide</a> for the information about all the changes<br clear="none"> in CXF 3.0.0. Here are more details on the changes specifically affecting JAX-RS users:</p><p>1. CXF RequestHandler and ResponseHandler filters have been removed.</p><p>These legacy CXF filters are still supported in 2.7.x but no longer in 3.0.0. Please use <a shape="rect" class="external-link" href="https://jax-rs-spec.java.net/nonav/2.0/apidocs/javax/ws/rs/container/ContainerRequestFilter.html" rel="nofollow">ContainerRequestFilter</a> and <a shape="rect" class="external-link" href="https://jax-rs-spec.java.net/nonav/2.0/apidocs/javax/ws/rs/container/ContainerResponseFilter.html" rel="nofollow">ContainerResponseFilter</a> instead. Also, <a shape="rect" class="external-link" href="https://jax-rs-spec.java.net/nonav/2.0/apidocs/javax/ws/rs/ext/ReaderInter
 ceptor.html" rel="nofollow">ReaderInterceptor</a> and <a shape="rect" class="external-link" href="https://jax-rs-spec.java.net/nonav/2.0/apidocs/javax/ws/rs/ext/WriterInterceptor.html" rel="nofollow">WriterInterceptor</a> can be used too.</p><p>Note, CXF filters had org.apache.cxf.message.Message available in the signature. If CXF Message is used in the existing CXF RequestHandler or ResponseHandler then use "org.apache.cxf.phase.PhaseInterceptorChain.getCurrentMessage()" or "org.apache.cxf.jaxrs.util.JAXRSUtils.getCurrentMessage()" to get a Message which has all the contextual information available.</p><p>For example, instead of</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+</div><h1 id="JAX-RS-Introduction">Introduction</h1><p><a shape="rect" class="external-link" href="http://en.wikipedia.org/wiki/JAX-RS" rel="nofollow">JAX-RS</a>: Java API for RESTful Web Services is a Java programming language API that provides support in creating web services according to the Representational State Transfer (REST) architectural style.</p><p>CXF supports the Java API for RESTful Web Services: JAX-RS 2.0 (<a shape="rect" class="external-link" href="http://jcp.org/en/jsr/detail?id=339" rel="nofollow">JSR-339</a>) and JAX-RS 1.1 (<a shape="rect" class="external-link" href="http://jcp.org/en/jsr/detail?id=311" rel="nofollow">JSR-311</a>).</p><p>CXF 3.0.0 completely implements JAX-RS 2.0 including new Client API. &#160;See&#160;<a shape="rect" href="#JAX-RS-2.0Final">below</a> for information about compliance.</p><p>Existing JAX-RS 1.1 applications can be run with CXF 3.0.0.</p><p>CXF 2.7.0 supports most of the new features introduced in JAX-RS 2.0 (excluding 2.0 Client
  API for now - but note that CXF client API has been retrofitted to support new filters, interceptors, exception classes and Response API, plus the asynchronous client invoker API).</p><p>CXF 2.6.x supports <a shape="rect" class="external-link" href="https://jsr311.dev.java.net/nonav/releases/1.1/index.html" rel="nofollow">JSR-311 API 1.1</a> and is JAX-RS TCK 1.1 compliant.</p><p>JAX-RS related demos are located under the <a shape="rect" class="external-link" href="http://svn.apache.org/viewvc/cxf/trunk/distribution/src/main/release/samples/jax_rs/">samples/jax_rs </a> directory.</p><p>This documentation will refer to JAX-RS 2.0 (JSR-339) API.</p><p>Outstanding JAX-RS JIRA issues can be found <a shape="rect" class="external-link" href="https://issues.apache.org/jira/secure/IssueNavigator.jspa?reset=true&amp;jqlQuery=project+%3D+CXF+AND+resolution+%3D+Unresolved+AND+component+%3D+JAX-RS+ORDER+BY+priority+DESC&amp;mode=hide">here</a>.</p><h1 id="JAX-RS-JAX-RSCompliance">JAX-RS Compli
 ance</h1><h2 id="JAX-RS-1.1">1.1</h2><p>Apache CXF 2.6.x passes the final JAX-RS 1.1 TCK and is formally 1.1 compliant.</p><p>Please consult the <a shape="rect" class="external-link" href="http://tomee.apache.org/apache-tomee.html">TomEE</a> documentation on the support of Java EE related JAX-RS 1.1 options in its Apache CXF-based JAX-RS runtime.</p><p>CXF 2.7.x and CXF 3.0.0 will fully support and run JAX-RS 1.1 applications but will not pass the JAX-RS 1.1 TCK Signature tests due to</p><p>CXF 2.7.x and CXF 3.0.0 depending on 2.0-m10 and 2.0 final versions of JAX-RS 2.0 API.</p><p>&#160;</p><p><span class="confluence-anchor-link" id="JAX-RS-2_0_FINAL"></span></p><h2 id="JAX-RS-2.0Final">2.0 Final</h2><p>CXF 3.x has been updated to implement the JAX-RS 2.0 API&#8217;s as completely as possible without access to the final JAX-RS 2.0 TCK. <br clear="none">We have done extensive testing with JAX-RS 2.0 user applications, samples, and the preliminary TCK to make sure CXF&#8217;s impleme
 ntation is as complete and compatible as we can make it. <br clear="none">CXF makes and will continue making the best possible effort to have JAX-RS 2.0 and new JAX-RS version implementations technically complete and offering an environment for running the portable JAX-RS 2.0 applications.<br clear="none">If the final 2.0 TCK is made available to Apache, we will make sure CXF is updated to pass.<br clear="none">If another TCK licensee that uses CXF&#8217;s JAX-RS 2.0 implementation in their products finds issues with CXF&#8217;s compliance, we are more than happy to fix bugs that are raised.</p><h1 id="JAX-RS-Projectsetupandconfiguration">Project setup and configuration</h1><h2 id="JAX-RS-Migration">Migration</h2><h3 id="JAX-RS-FromJAX-RS1.1to2.0">From JAX-RS 1.1 to 2.0</h3><p>JAX-RS 2.0 is backward compatible with JAX-RS 1.1. Please see <a shape="rect" href="jax-rs-basics.html">JAX-RS Basics</a> for more information about JAX-RS 2.0.</p><p>CXF 2.7.10 and CXF 3.0.0 are expected to s
 upport existing JAX-RS 1.1 applications.</p><h3 id="JAX-RS-FromCXF2.7.xtoCXF3.0.0">From CXF 2.7.x to CXF 3.0.0</h3><p>Please check the <a shape="rect" href="http://cxf.apache.org/docs/30-migration-guide.html">CXF 3.0.0 Migration Guide</a> for the information about all the changes<br clear="none"> in CXF 3.0.0. Here are more details on the changes specifically affecting JAX-RS users:</p><p>1. CXF RequestHandler and ResponseHandler filters have been removed.</p><p>These legacy CXF filters are still supported in 2.7.x but no longer in 3.0.0. Please use <a shape="rect" class="external-link" href="https://jax-rs-spec.java.net/nonav/2.0/apidocs/javax/ws/rs/container/ContainerRequestFilter.html" rel="nofollow">ContainerRequestFilter</a> and <a shape="rect" class="external-link" href="https://jax-rs-spec.java.net/nonav/2.0/apidocs/javax/ws/rs/container/ContainerResponseFilter.html" rel="nofollow">ContainerResponseFilter</a> instead. Also, <a shape="rect" class="external-link" href="https://
 jax-rs-spec.java.net/nonav/2.0/apidocs/javax/ws/rs/ext/ReaderInterceptor.html" rel="nofollow">ReaderInterceptor</a> and <a shape="rect" class="external-link" href="https://jax-rs-spec.java.net/nonav/2.0/apidocs/javax/ws/rs/ext/WriterInterceptor.html" rel="nofollow">WriterInterceptor</a> can be used too.</p><p>Note, CXF filters had org.apache.cxf.message.Message available in the signature. If CXF Message is used in the existing CXF RequestHandler or ResponseHandler then use "org.apache.cxf.phase.PhaseInterceptorChain.getCurrentMessage()" or "org.apache.cxf.jaxrs.util.JAXRSUtils.getCurrentMessage()" to get a Message which has all the contextual information available.</p><p>For example, instead of</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[public class CustomRequestHandler implements RequestHandler {
     public Response handleRequest(Message message, ClassResourceInfo cri) {
     }
@@ -238,7 +238,7 @@ public void upload(@Multipart InputStrea
 
    &lt;/dependency&gt;
 ]]></script>
-</div></div><h1 id="JAX-RS-WhatisNew">What is New</h1><ul><li>Complete support for JAX-RS 2.0, please see <a shape="rect" href="jax-rs-basics.html">JAX-RS Basics</a> for more information</li><li>Bean Validation 1.1 Support, please see <a shape="rect" href="http://cxf.apache.org/docs/validationfeature.html">http://cxf.apache.org/docs/validationfeature.html</a> for more information</li><li>Swagger Feature</li></ul><h1 id="JAX-RS-GettingStartedwithJAX-RS">Getting Started with JAX-RS</h1><h2 id="JAX-RS-UnderstandingtheBasics">Understanding the Basics</h2><p>You are encouraged to read <a shape="rect" class="external-link" href="http://jcp.org/en/jsr/detail?id=339" rel="nofollow">JSR-339</a> specification to find out information not covered by this documentation. The specification introduces many terms such as root resources, resource methods, sub-resources and sub-resource locators, message body readers and writers. JAX-RS 2.0 additionally introduces filters, interceptors, new client API
 , features, new exception classes, server-side support for asynchronous invocations.</p><p>Please see the <a shape="rect" href="jax-rs-basics.html">JAX-RS Basics</a> page for more information.</p><h2 id="JAX-RS-SupportforDataBindings">Support for Data Bindings</h2><p>JAX-RS MessageBodyReader and MessageBodyWriter can be used to create data bindings for reading and writing data in a number of different formats. Compliant JAX-RS implementations are expected to support JAXB-annotated beans, JAXP Source objects, InputStreams, etc.</p><p>In addition, CXF JAX-RS lets users reuse existing CXF DataBindings for working with JAXB, XBeans, Aegis and SDO.</p><p>Please see the <a shape="rect" href="jax-rs-data-bindings.html">JAX-RS Data Bindings</a> page for more information.</p><h2 id="JAX-RS-HowRequestURIisMatched">How Request URI is Matched</h2><p>Lets assume you have a web application called 'rest'. CXFServlet's url-pattern is "/test/*". Finally, jaxrs:server's address is "/bar".</p><p>Reque
 sts like /rest/test/bar or /rest/test/bar/baz will be delivered to one of the resource classes in a given jaxrs:server endpoint. For the former request to be handled, a resource class with @Path("/") should be available, in the latter case - at least @Path("/") or a more specific @Path("/baz").</p><p>The same requirement can be expressed by having a CXFServlet with "/*" and jaxrs:server with "/test/bar".</p><p>When both CXFServlet and jaxrs:server use "/" then it's a root resource class which should provide a @Path with at least "/test/bar" for the above requests to be matched.</p><p>Generally, it can be a good idea to specify the URI segments which are more likely to change now and then with CXFServlets or jaxrs:server.</p><h2 id="JAX-RS-ClientAPI">Client API</h2><p>CXF 3.0.0 implements JAX-RS 2.0 Client API.</p><p>CXF 2.7.x or earlier provides a comprehensive support for developing RESTful clients by supporting 3 flavors of the client API: proxy-based, HTTP-centric and XML-centric
 . CXF-specific client API is supported alongside new JAX-RS 2.0 Client API in CXF 3.0.0.</p><p>Please see the <a shape="rect" href="jax-rs-client-api.html">JAX-RS Client API</a> page for more information.</p><h2 id="JAX-RS-BeanValidation">Bean Validation</h2><p>Bean Validation 1.1 is supported since CXF 3.0.0-milestone1. Please see the <a shape="rect" href="http://cxf.apache.org/docs/validationfeature.html">http://cxf.apache.org/docs/validationfeature.html</a> for more information.</p><h2 id="JAX-RS-Filters,InterceptorsandInvokers">Filters, Interceptors and Invokers</h2><p>It is possible to intercept and modify the inbound and outbound calls with the help of CXF JAX-RS filters and/or CXF interceptors. Additionally, custom invokers offer an option to intercept a call immediately before a service bean is invoked.</p><p>Please see the <a shape="rect" href="jax-rs-filters.html">JAX-RS Filters</a> page for more information.</p><p>Please see the <a shape="rect" href="jax-rs-basics.html">J
 AX-RS Basics</a> page for more information about new JAX-RS 2.0 filters and interceptors available in CXF 2.7.x and 3.0.0.</p><h2 id="JAX-RS-ServicelistingsandWADLsupport">Service listings and WADL support</h2><p><strong>New</strong>: Swagger feature has been introduced.</p><p>CXF JAX-RS supports <a shape="rect" class="external-link" href="http://www.w3.org/Submission/wadl" rel="nofollow">WADL</a>. CXF JAX-RS service endpoints can be listed in the service listings page and users can check the WADL documents.</p><p>Please see the <a shape="rect" href="jaxrs-services-description.html">JAXRS Services Description</a> page for more information.</p><h2 id="JAX-RS-ConfiguringJAX-RSservices">Configuring JAX-RS services</h2><p>JAX-RS services can be configured programmatically, using Blueprint, Spring or CXFNonSpringJAXRSServlet.</p><p>Please see the <a shape="rect" href="jaxrs-services-configuration.html">JAXRS Services Configuration</a> page for more information.</p><h2 id="JAX-RS-Testing"
 >Testing</h2><p>JAX-RS services can be easily tested using the embedded Jetty or CXF Local Transport.<br clear="none"> Please see the <a shape="rect" href="https://cwiki.apache.org/confluence/display/CXF20DOC/JAXRS+Testing">JAXRS Testing</a> page for more information.</p><h2 id="JAX-RS-Debugging">Debugging</h2><p>One may want to use a browser to test how a given HTTP resource reacts to different HTTP Accept or Accept-Language header values and request methods. For example, if a resource class supports a "/resource" URI then one can test the resource class using one of the following queries :</p><p><code>&gt; GET /resource.xml</code><br clear="none"> <code>&gt; GET /resource.en</code></p><p>The runtime will replace '.xml' or '.en' with an appropriate header value. For it to know the type or language value associated with a given URI suffix, some configuration needs to be done. Here's an example of how it can be done with Spring:</p><div class="code panel pdl" style="border-width: 1px
 ;"><div class="codeContent panelContent pdl">
+</div></div><h1 id="JAX-RS-WhatisNew">What is New</h1><ul><li>Complete support for JAX-RS 2.0, please see <a shape="rect" href="jax-rs-basics.html">JAX-RS Basics</a> for more information</li><li>Bean Validation 1.1 Support, please see <a shape="rect" href="http://cxf.apache.org/docs/validationfeature.html">http://cxf.apache.org/docs/validationfeature.html</a> for more information</li><li>Swagger Feature</li></ul><h1 id="JAX-RS-GettingStartedwithJAX-RS">Getting Started with JAX-RS</h1><h2 id="JAX-RS-UnderstandingtheBasics">Understanding the Basics</h2><p>You are encouraged to read <a shape="rect" class="external-link" href="http://jcp.org/en/jsr/detail?id=339" rel="nofollow">JSR-339</a> specification to find out information not covered by this documentation. The specification introduces many terms such as root resources, resource methods, sub-resources and sub-resource locators, message body readers and writers. JAX-RS 2.0 additionally introduces filters, interceptors, new client API
 , features, new exception classes, server-side support for asynchronous invocations.</p><p>Please see the <a shape="rect" href="jax-rs-basics.html">JAX-RS Basics</a> page for more information.</p><h2 id="JAX-RS-SupportforDataBindings">Support for Data Bindings</h2><p>JAX-RS MessageBodyReader and MessageBodyWriter can be used to create data bindings for reading and writing data in a number of different formats. Compliant JAX-RS implementations are expected to support JAXB-annotated beans, JAXP Source objects, InputStreams, etc.</p><p>In addition, CXF JAX-RS lets users reuse existing CXF DataBindings for working with JAXB, XBeans, Aegis and SDO.</p><p>Please see the <a shape="rect" href="jax-rs-data-bindings.html">JAX-RS Data Bindings</a> page for more information.</p><h2 id="JAX-RS-HowRequestURIisMatched">How Request URI is Matched</h2><p>Lets assume you have a web application called 'rest'. CXFServlet's url-pattern is "/test/*". Finally, jaxrs:server's address is "/bar".</p><p>Reque
 sts like /rest/test/bar or /rest/test/bar/baz will be delivered to one of the resource classes in a given jaxrs:server endpoint. For the former request to be handled, a resource class with @Path("/") should be available, in the latter case - at least @Path("/") or a more specific @Path("/baz").</p><p>The same requirement can be expressed by having a CXFServlet with "/*" and jaxrs:server with "/test/bar".</p><p>When both CXFServlet and jaxrs:server use "/" then it's a root resource class which should provide a @Path with at least "/test/bar" for the above requests to be matched.</p><p>Generally, it can be a good idea to specify the URI segments which are more likely to change now and then with CXFServlets or jaxrs:server.</p><h2 id="JAX-RS-ClientAPI">Client API</h2><p>CXF 3.0.0 implements JAX-RS 2.0 Client API.</p><p>CXF 2.7.x or earlier provides a comprehensive support for developing RESTful clients by supporting 3 flavors of the client API: proxy-based, HTTP-centric and XML-centric
 . CXF-specific client API is supported alongside new JAX-RS 2.0 Client API in CXF 3.0.0.</p><p>Please see the <a shape="rect" href="jax-rs-client-api.html">JAX-RS Client API</a> page for more information.</p><h2 id="JAX-RS-BeanValidation">Bean Validation</h2><p>Bean Validation 1.1 is supported since CXF 3.0.0-milestone1. Please see the <a shape="rect" href="http://cxf.apache.org/docs/validationfeature.html">http://cxf.apache.org/docs/validationfeature.html</a> for more information.</p><h2 id="JAX-RS-Filters,InterceptorsandInvokers">Filters, Interceptors and Invokers</h2><p>It is possible to intercept and modify the inbound and outbound calls with the help of CXF JAX-RS filters and/or CXF interceptors. Additionally, custom invokers offer an option to intercept a call immediately before a service bean is invoked.</p><p>Please see the <a shape="rect" href="jax-rs-filters.html">JAX-RS Filters</a> page for more information.</p><p>Please see the <a shape="rect" href="jax-rs-basics.html">J
 AX-RS Basics</a> page for more information about new JAX-RS 2.0 filters and interceptors available in CXF 2.7.x and 3.0.0.</p><h2 id="JAX-RS-ServicelistingsandWADLsupport">Service listings and WADL support</h2><p><strong>New</strong>: Swagger feature has been introduced.</p><p>CXF JAX-RS supports <a shape="rect" class="external-link" href="http://www.w3.org/Submission/wadl" rel="nofollow">WADL</a>. CXF JAX-RS service endpoints can be listed in the service listings page and users can check the WADL documents.</p><p>Please see the <a shape="rect" href="jaxrs-services-description.html">JAXRS Services Description</a> page for more information.</p><h2 id="JAX-RS-ConfiguringJAX-RSservices">Configuring JAX-RS services</h2><p>JAX-RS services can be configured programmatically, using Blueprint, Spring or CXFNonSpringJAXRSServlet.</p><p>Please see the <a shape="rect" href="jaxrs-services-configuration.html">JAXRS Services Configuration</a> page for more information.</p><h2 id="JAX-RS-Testing"
 >Testing</h2><p>JAX-RS services can be easily tested using the embedded Jetty or CXF Local Transport.<br clear="none"> Please see the <a shape="rect" href="https://cwiki.apache.org/confluence/display/CXF20DOC/JAXRS+Testing">JAXRS Testing</a> page for more information.</p><h2 id="JAX-RS-Debugging">Debugging</h2><p>One may want to use a browser to test how a given HTTP resource reacts to different HTTP Accept or Accept-Language header values and request methods. For example, if a resource class supports a "/resource" URI then one can test the resource class using one of the following queries :</p><p><code>&gt; GET /resource.xml</code> <br clear="none"> <code>&gt; GET /resource.en</code></p><p>The runtime will replace '.xml' or '.en' with an appropriate header value. For it to know the type or language value associated with a given URI suffix, some configuration needs to be done. Here's an example of how it can be done with Spring:</p><div class="code panel pdl" style="border-width: 1p
 x;"><div class="codeContent panelContent pdl">
 <script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[  &lt;jaxrs:server id=&quot;customerService&quot; address=&quot;/&quot;&gt;
     &lt;jaxrs:serviceBeans&gt;
       &lt;bean class=&quot;org.apache.cxf.jaxrs.systests.CustomerService&quot; /&gt;
@@ -252,7 +252,7 @@ public void upload(@Multipart InputStrea
     &lt;/jaxrs:languageMappings&gt;
   &lt;/jaxrs:server&gt;
 ]]></script>
-</div></div><p>CXF also supports a _type query as an alternative to appending extensions like '.xml' to request URIs:</p><p>{{ &gt; GET /resource?_type=xml}}</p><p>Overriding a request method is also easy:</p><p><code>&gt; GET /resource?_method=POST</code></p><p>Alternatively, one can specify an HTTP header X-HTTP-Method-Override:</p><p><code>&gt; POST /books</code><br clear="none"> <code>&gt; X-HTTP-Method-Override : PATCH</code></p><p>For example, at the moment the http-centric client API does not support arbitrary HTTP verbs except for those supported <br clear="none"> by Java HTTPUrlConnection. When needed, X-HTTP-Method-Override can be set to overcome this limitation.</p><p>Finally, a "_ctype" query allows for overriding Content-Type.</p><p>Please see the <a shape="rect" href="debugging-and-logging.html">Debugging and Logging</a> page for more information on how to debug and log service calls in CXF.</p><h2 id="JAX-RS-Logging">Logging</h2><p>Many of the existing CXF features ca
 n be applied either to <code>jaxrs:server</code> or <code>jaxrs:client</code>. For example, to enable logging of requests and responses, simply do:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+</div></div><p>CXF also supports a _type query as an alternative to appending extensions like '.xml' to request URIs:</p><p>{{ &gt; GET /resource?_type=xml}}</p><p>Overriding a request method is also easy:</p><p><code>&gt; GET /resource?_method=POST</code></p><p>Alternatively, one can specify an HTTP header X-HTTP-Method-Override:</p><p><code>&gt; POST /books</code> <br clear="none"> <code>&gt; X-HTTP-Method-Override : PATCH</code></p><p>For example, at the moment the http-centric client API does not support arbitrary HTTP verbs except for those supported <br clear="none"> by Java HTTPUrlConnection. When needed, X-HTTP-Method-Override can be set to overcome this limitation.</p><p>Finally, a "_ctype" query allows for overriding Content-Type.</p><p>Please see the <a shape="rect" href="debugging-and-logging.html">Debugging and Logging</a> page for more information on how to debug and log service calls in CXF.</p><h2 id="JAX-RS-Logging">Logging</h2><p>Many of the existing CXF features c
 an be applied either to <code>jaxrs:server</code> or <code>jaxrs:client</code>. For example, to enable logging of requests and responses, simply do:</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;beans xmlns:cxf=&quot;http://cxf.apache.org/core&quot; 
    xsi:schemaLocation=&quot;http://cxf.apache.org/core 
       http://cxf.apache.org/schemas/core.xsd&quot;&gt;
@@ -263,7 +263,7 @@ public void upload(@Multipart InputStrea
 &lt;jaxrs:server&gt;
 &lt;/beans&gt;
 ]]></script>
-</div></div><p>Please make sure the <code><a shape="rect" href="http://cxf.apache.org/core">http://cxf.apache.org/core</a></code> namespace is in scope.</p><p>Starting from CXF 2.3.0 it is also possible to convert log events into Atom entries and either push them to receivers or make them available for polling.</p><p>Please see the <a shape="rect" href="debugging-and-logging.html">Debugging and Logging</a> page for more information.</p><h1 id="JAX-RS-AdvancedFeatures">Advanced Features</h1><h2 id="JAX-RS-Multiparts">Multiparts</h2><p>Multiparts can be handled in a number of ways. The CXF core runtime provides advanced support for handling attachments which CXF JAX-RS builds upon.</p><p>Please see the <a shape="rect" href="jax-rs-multiparts.html">JAX-RS Multiparts</a> page for more information.</p><h2 id="JAX-RS-SecureJAX-RSservices">Secure JAX-RS services</h2><p>Transport level HTTPS security can be used to protect messages exchanged between CXF JAX-RS endpoints and providers.</p><p
 >Authentication and authorization can be enforced in a number of ways.</p><p>Please see the <a shape="rect" href="secure-jax-rs-services.html">Secure JAX-RS Services</a> page for more information.</p><p>Please also check <a shape="rect" href="http://cxf.apache.org/docs/jax-rs-xml-security.html">JAX-RS XML Security</a>, <a shape="rect" href="jax-rs-saml.html">JAX-RS SAML</a> and <a shape="rect" href="jax-rs-oauth2.html">JAX-RS OAuth2</a> pages for more information about the advanced security topics.</p><h2 id="JAX-RS-FailoverandLoadDistributionFeatures">Failover and Load Distribution Features</h2><p>Starting from CXF 2.4.1, CXF JAX-RS proxy and WebClient consumers can be backed up by failover and load distribution features.<br clear="none"> Please see the <a shape="rect" href="jax-rs-failover.html">JAX-RS Failover</a> page for more information.</p><h2 id="JAX-RS-Redirection">Redirection</h2><p>Starting from CXF 2.2.5 it is possible to redirect the request or response call to other se
 rvlet resources by configuring CXFServlet or using CXF JAX-RS RequestDispatcherProvider.</p><p>Please see the <a shape="rect" href="jax-rs-redirection.html">JAX-RS Redirection</a> page for more information.</p><h2 id="JAX-RS-XSLTandXPath">XSLT and XPath</h2><p>XSLT and XPath are promoted and treated as first-class citizens in CXF JAX-RS. These technologies can be very powerful when generating complex data or retrieving data of interest out of complex XML fragments.</p><p>Please see the <a shape="rect" href="jax-rs-advanced-xml.html">JAX-RS Advanced XML</a> page for more information.</p><h2 id="JAX-RS-ComplexSearchQueries">Complex Search Queries</h2><p>Using <a shape="rect" href="http://cxf.apache.org/docs/jax-rs.html#JAX-RS-Parameterbeans">query parameter beans</a> provides a way to capture search requirements that can be expressed by enumerating name/value pairs, for example, a query such as '?name=CXF&amp;version=2.3' can be captured by a bean containing setName and setVersion met
 hods. This 'template' bean can be used in the code to compare it against all available local data.</p><p>Versions 2.3 and later of CXF JAXRS support another option for doing advanced search queries using the <a shape="rect" class="external-link" href="http://tools.ietf.org/html/draft-nottingham-atompub-fiql-00" rel="nofollow">Feed Item Query Language</a>(FIQL).</p><p>Please see the <a shape="rect" href="jax-rs-search.html">JAX-RS Search</a> page for more information.</p><h2 id="JAX-RS-Model-View-Controllersupport">Model-View-Controller support</h2><p><strong>XSLT</strong><br clear="none"> Please see the <a shape="rect" href="jax-rs-advanced-xml.html">JAX-RS Advanced XML</a> page for more information. on how <code>XSLTJaxbProvider</code> can be used to generate complex (X)HTML views.</p><p><strong>JSP</strong></p><p>With the introduction of <code>RequestDispatcherProvider</code> it is now possible for JAXRS service responses be redirected to JSP pages for further processing. Please s
 ee the <a shape="rect" href="jax-rs-redirection.html">JAX-RS Redirection</a> page for more information.</p><h2 id="JAX-RS-CombiningJAX-WSandJAX-RS">Combining JAX-WS and JAX-RS</h2><p>CXF JAX-RS tries to make it easy for SOAP developers to experiment with JAX-RS and combine both JAX-WS and JAX-RS in the same service bean when needed.</p><p>Please see the <a shape="rect" href="jax-rs-and-jax-ws.html">JAX-RS and JAX-WS</a> page for more information.</p><h2 id="JAX-RS-IntegrationwithDistributedOSGi">Integration with Distributed OSGi</h2><p>Distributed OSGi RI is a CXF <a shape="rect" href="http://cxf.apache.org/distributed-osgi.html">subproject</a>. DOSGi mandates how registered Java interfaces can be exposed<br clear="none"> and consumed as remote services. DOSGi single and multi bundle distributions contain all the OSGI bundles required for a CXF endpoint be successfully published.</p><p>CXF JAX-RS implementations has been integrated with DOSGi RI 1.1-SNAPSHOT which makes it possible 
 to expose Java interfaces as RESTful services and consume such services using a proxy-based client API.</p><p>Please see the <a shape="rect" href="http://cxf.apache.org/distributed-osgi-reference.html#DistributedOSGiReference-ServiceProviderproperties">DOSGI Reference page</a> ('org.apache.cxf.rs' properties) and a <a shape="rect" class="external-link" href="http://svn.apache.org/repos/asf/cxf/dosgi/trunk/samples/greeter_rest/">greeter_rest</a> sample for more information. Note that this demo can be run exactly as a SOAP-based <a shape="rect" href="http://cxf.apache.org/distributed-osgi-greeter-demo-walkthrough.html">greeter</a> demo as it registers and consumes a similar (but) JAX-RS annotated <a shape="rect" class="external-link" href="http://svn.apache.org/repos/asf/cxf/dosgi/trunk/samples/greeter_rest/interface/src/main/java/org/apache/cxf/dosgi/samples/greeter/rest/GreeterService.java">GreeterService</a>. In addition, this demo shows how one can register and consume a given int
 erface (<a shape="rect" class="external-link" href="http://svn.apache.org/repos/asf/cxf/dosgi/trunk/samples/greeter_rest/interface/src/main/java/org/apache/cxf/dosgi/samples/greeter/rest/GreeterService2.java">GreeterService2</a>) without using explicit JAX-RS annotations but providing an out-of-band <a shape="rect" class="external-link" href="http://svn.apache.org/repos/asf/cxf/dosgi/trunk/samples/greeter_rest/interface/src/main/resources/OSGI-INF/cxf/jaxrs/GreeterService2-model.xml">user model description</a>.</p><h2 id="JAX-RS-OtherAdvancedFeatures">Other Advanced Features</h2><p>CXF JAX-RS provides a number of advanced extensions such as the support for the JMS transport, one-way invocations (HTTP and JMS), suspended invocations (HTTP and JMS), making existing code REST-aware by applying external user models, etc.</p><p>Please see the <a shape="rect" href="jax-rs-advanced-features.html">JAX-RS Advanced Features</a> page for more information.</p><h1 id="JAX-RS-MavenPlugins">Maven 
 Plugins</h1><p>Please see the <a shape="rect" href="jax-rs-maven-plugins.html">JAX-RS Maven Plugins</a> page for more information about the Maven plugins and archetypes which can help with creating CXF JAX-RS applications.</p><h1 id="JAX-RS-Deployment">Deployment</h1><p>CXF JAX-RS applications packaged as WAR archives can be deployed into standalone Servlet containers such as Tomcat or Jetty.<br clear="none"> Please see the <a shape="rect" href="https://cwiki.apache.org/confluence/display/CXF20DOC/JAX-RS+Deployment">JAX-RS Deployment</a> page for the tips on how to deploy the CXF JAX-RS applications into various Java EE and OSGI application servers successfully.</p><h1 id="JAX-RS-Third-partyprojects">Third-party projects</h1><ul><li>REST Utilities: <a shape="rect" class="external-link" href="https://github.com/taimos/RESTUtils" rel="nofollow">RESTUtils</a></li></ul><h1 id="JAX-RS-References">References</h1><ul><li><a shape="rect" class="external-link" href="http://jcp.org/aboutJava/
 communityprocess/final/jsr311/index.html" rel="nofollow">JSR-000311 JAX-RS: The JavaTM API for RESTful Web Services</a></li><li><a shape="rect" class="external-link" href="http://www.ics.uci.edu/~fielding/pubs/dissertation/top.htm" rel="nofollow">Architectural Styles and the Design of Network-based Software Architectures</a></li><li><a shape="rect" class="external-link" href="http://en.wikipedia.org/wiki/Representational_State_Transfer" rel="nofollow">Representational State Transfer - Wikipedia </a></li><li><a shape="rect" class="external-link" href="http://oreilly.com/catalog/9780596801694/" rel="nofollow">RESTful Web Services Cookbook - Solutions for Improving Scalability and Simplicity</a> <em>by Subbu Allamarajuy</em> (O'Reilly Media, February 2010)</li><li><a shape="rect" class="external-link" href="http://oreilly.com/catalog/9780596158057/" rel="nofollow">RESTful Java with JAX-RS</a> <em>by Bill Burke</em> (O'Reilly Media, November 2009)</li><li><a shape="rect" class="external
 -link" href="http://oreilly.com/catalog/9780596521134/" rel="nofollow">Java Web Services: Up and Running </a> <em>by Martin Kalin</em> (O'Reilly Media, February 2009)</li><li><a shape="rect" class="external-link" href="http://oreilly.com/catalog/9780596529260/" rel="nofollow">RESTful Web Services - Web services for the real world</a> <em>by Leonard Richardson, Sam Ruby</em> (O'Reilly Media, May 2007)</li><li><a shape="rect" class="external-link" href="http://www.oracle.com/technetwork/articles/javase/index-137171.html" rel="nofollow">RESTful Web Services</a> <em>by Sameer Tyagi</em> (Oracle , August 2006)</li><li><a shape="rect" class="external-link" href="http://www.crummy.com/writing/RESTful-Web-Services/" rel="nofollow">RESTful Web Services - "Unofficial homepage for a book about simple web services."</a> <em>Unknown</em></li><li><a shape="rect" class="external-link" href="http://tomayko.com/writings/rest-to-my-wife" rel="nofollow">How I Explained REST to My Wife</a> <em>by Ryan 
 Tomayko</em> (<a shape="rect" class="external-link" href="http://tomayko.com" rel="nofollow">http://tomayko.com</a>, December 2004)</li></ul><h1 id="JAX-RS-Howtocontribute">How to contribute</h1><p>CXF JAX-RS implementation sits on top of the core CXF runtime and is quite self-contained and isolated from other CXF modules such as jaxws and simple frontends.</p><p>Please check the <a shape="rect" class="external-link" href="http://issues.apache.org/jira/secure/IssueNavigator.jspa?reset=true&amp;mode=hide&amp;pid=12310511&amp;sorter/order=DESC&amp;sorter/field=priority&amp;resolution=-1&amp;component=12311911">issue list</a> and see if you are interested in fixing one of the issues.</p><p>If you decide to go ahead then the fastest way to start is to</p><ul><li>do the fast trunk build using '<code>mvn install -Pfastinstall</code>'</li><li>setup the workspace 'mvn -Psetup.eclipse' which will create a workspace in a 'workspace' folder, next to 'trunk'</li><li>import cxf modules from the 
 trunk into the workspace and start working with the cxf-frontend-jaxrs module</li></ul><p>If you are about to submit a patch after building a trunk/rt/frontend/jaxrs, then please also run JAX-RS system tests in trunk/systests/jaxrs :<br clear="none"> <code>&gt; mvn install</code></p><p>You can also check out the general <a shape="rect" href="http://cxf.apache.org/getting-involved.html">Getting Involved</a> web page for more information on contributing.</p></div>
+</div></div><p>Please make sure the <code> <a shape="rect" href="http://cxf.apache.org/core">http://cxf.apache.org/core</a> </code> namespace is in scope.</p><p>Starting from CXF 2.3.0 it is also possible to convert log events into Atom entries and either push them to receivers or make them available for polling.</p><p>Please see the <a shape="rect" href="debugging-and-logging.html">Debugging and Logging</a> page for more information.</p><h1 id="JAX-RS-AdvancedFeatures">Advanced Features</h1><h2 id="JAX-RS-Multiparts">Multiparts</h2><p>Multiparts can be handled in a number of ways. The CXF core runtime provides advanced support for handling attachments which CXF JAX-RS builds upon.</p><p>Please see the <a shape="rect" href="jax-rs-multiparts.html">JAX-RS Multiparts</a> page for more information.</p><h2 id="JAX-RS-SecureJAX-RSservices">Secure JAX-RS services</h2><p>Transport level HTTPS security can be used to protect messages exchanged between CXF JAX-RS endpoints and providers.</p>
 <p>Authentication and authorization can be enforced in a number of ways.</p><p>Please see the <a shape="rect" href="secure-jax-rs-services.html">Secure JAX-RS Services</a> page for more information.</p><p>Please also check <a shape="rect" href="http://cxf.apache.org/docs/jax-rs-xml-security.html">JAX-RS XML Security</a>, <a shape="rect" href="jax-rs-saml.html">JAX-RS SAML</a> and <a shape="rect" href="jax-rs-oauth2.html">JAX-RS OAuth2</a> pages for more information about the advanced security topics.</p><h2 id="JAX-RS-FailoverandLoadDistributionFeatures">Failover and Load Distribution Features</h2><p>Starting from CXF 2.4.1, CXF JAX-RS proxy and WebClient consumers can be backed up by failover and load distribution features.<br clear="none"> Please see the <a shape="rect" href="jax-rs-failover.html">JAX-RS Failover</a> page for more information.</p><h2 id="JAX-RS-Redirection">Redirection</h2><p>Starting from CXF 2.2.5 it is possible to redirect the request or response call to other 
 servlet resources by configuring CXFServlet or using CXF JAX-RS RequestDispatcherProvider.</p><p>Please see the <a shape="rect" href="jax-rs-redirection.html">JAX-RS Redirection</a> page for more information.</p><h2 id="JAX-RS-XSLTandXPath">XSLT and XPath</h2><p>XSLT and XPath are promoted and treated as first-class citizens in CXF JAX-RS. These technologies can be very powerful when generating complex data or retrieving data of interest out of complex XML fragments.</p><p>Please see the <a shape="rect" href="jax-rs-advanced-xml.html">JAX-RS Advanced XML</a> page for more information.</p><h2 id="JAX-RS-ComplexSearchQueries">Complex Search Queries</h2><p>Using <a shape="rect" href="http://cxf.apache.org/docs/jax-rs.html#JAX-RS-Parameterbeans">query parameter beans</a> provides a way to capture search requirements that can be expressed by enumerating name/value pairs, for example, a query such as '?name=CXF&amp;version=2.3' can be captured by a bean containing setName and setVersion m
 ethods. This 'template' bean can be used in the code to compare it against all available local data.</p><p>Versions 2.3 and later of CXF JAXRS support another option for doing advanced search queries using the <a shape="rect" class="external-link" href="http://tools.ietf.org/html/draft-nottingham-atompub-fiql-00" rel="nofollow">Feed Item Query Language</a>(FIQL).</p><p>Please see the <a shape="rect" href="jax-rs-search.html">JAX-RS Search</a> page for more information.</p><h2 id="JAX-RS-Model-View-Controllersupport">Model-View-Controller support</h2><p><strong>XSLT</strong> <br clear="none"> Please see the <a shape="rect" href="jax-rs-advanced-xml.html">JAX-RS Advanced XML</a> page for more information. on how <code>XSLTJaxbProvider</code> can be used to generate complex (X)HTML views.</p><p><strong>JSP</strong></p><p>With the introduction of <code>RequestDispatcherProvider</code> it is now possible for JAXRS service responses be redirected to JSP pages for further processing. Pleas
 e see the <a shape="rect" href="jax-rs-redirection.html">JAX-RS Redirection</a> page for more information.</p><h2 id="JAX-RS-CombiningJAX-WSandJAX-RS">Combining JAX-WS and JAX-RS</h2><p>CXF JAX-RS tries to make it easy for SOAP developers to experiment with JAX-RS and combine both JAX-WS and JAX-RS in the same service bean when needed.</p><p>Please see the <a shape="rect" href="jax-rs-and-jax-ws.html">JAX-RS and JAX-WS</a> page for more information.</p><h2 id="JAX-RS-IntegrationwithDistributedOSGi">Integration with Distributed OSGi</h2><p>Distributed OSGi RI is a CXF <a shape="rect" href="http://cxf.apache.org/distributed-osgi.html">subproject</a>. DOSGi mandates how registered Java interfaces can be exposed<br clear="none"> and consumed as remote services. DOSGi single and multi bundle distributions contain all the OSGI bundles required for a CXF endpoint be successfully published.</p><p>CXF JAX-RS implementations has been integrated with DOSGi RI 1.1-SNAPSHOT which makes it possib
 le to expose Java interfaces as RESTful services and consume such services using a proxy-based client API.</p><p>Please see the <a shape="rect" href="http://cxf.apache.org/distributed-osgi-reference.html#DistributedOSGiReference-ServiceProviderproperties">DOSGI Reference page</a> ('org.apache.cxf.rs' properties) and a <a shape="rect" class="external-link" href="http://svn.apache.org/repos/asf/cxf/dosgi/trunk/samples/greeter_rest/">greeter_rest</a> sample for more information. Note that this demo can be run exactly as a SOAP-based <a shape="rect" href="http://cxf.apache.org/distributed-osgi-greeter-demo-walkthrough.html">greeter</a> demo as it registers and consumes a similar (but) JAX-RS annotated <a shape="rect" class="external-link" href="http://svn.apache.org/repos/asf/cxf/dosgi/trunk/samples/greeter_rest/interface/src/main/java/org/apache/cxf/dosgi/samples/greeter/rest/GreeterService.java">GreeterService</a>. In addition, this demo shows how one can register and consume a given 
 interface (<a shape="rect" class="external-link" href="http://svn.apache.org/repos/asf/cxf/dosgi/trunk/samples/greeter_rest/interface/src/main/java/org/apache/cxf/dosgi/samples/greeter/rest/GreeterService2.java">GreeterService2</a>) without using explicit JAX-RS annotations but providing an out-of-band <a shape="rect" class="external-link" href="http://svn.apache.org/repos/asf/cxf/dosgi/trunk/samples/greeter_rest/interface/src/main/resources/OSGI-INF/cxf/jaxrs/GreeterService2-model.xml">user model description</a>.</p><h2 id="JAX-RS-OtherAdvancedFeatures">Other Advanced Features</h2><p>CXF JAX-RS provides a number of advanced extensions such as the support for the JMS transport, one-way invocations (HTTP and JMS), suspended invocations (HTTP and JMS), making existing code REST-aware by applying external user models, etc.</p><p>Please see the <a shape="rect" href="jax-rs-advanced-features.html">JAX-RS Advanced Features</a> page for more information.</p><h1 id="JAX-RS-MavenPlugins">Mav
 en Plugins</h1><p>Please see the <a shape="rect" href="jax-rs-maven-plugins.html">JAX-RS Maven Plugins</a> page for more information about the Maven plugins and archetypes which can help with creating CXF JAX-RS applications.</p><h1 id="JAX-RS-Deployment">Deployment</h1><p>CXF JAX-RS applications packaged as WAR archives can be deployed into standalone Servlet containers such as Tomcat or Jetty.<br clear="none"> Please see the <a shape="rect" href="https://cwiki.apache.org/confluence/display/CXF20DOC/JAX-RS+Deployment">JAX-RS Deployment</a> page for the tips on how to deploy the CXF JAX-RS applications into various Java EE and OSGI application servers successfully.</p><h1 id="JAX-RS-Third-partyprojects">Third-party projects</h1><ul><li>REST Utilities: <a shape="rect" class="external-link" href="https://github.com/taimos/RESTUtils" rel="nofollow">RESTUtils</a></li></ul><h1 id="JAX-RS-References">References</h1><ul><li><a shape="rect" class="external-link" href="http://jcp.org/aboutJa
 va/communityprocess/final/jsr311/index.html" rel="nofollow">JSR-000311 JAX-RS: The JavaTM API for RESTful Web Services</a></li><li><a shape="rect" class="external-link" href="http://www.ics.uci.edu/~fielding/pubs/dissertation/top.htm" rel="nofollow">Architectural Styles and the Design of Network-based Software Architectures</a></li><li><a shape="rect" class="external-link" href="http://en.wikipedia.org/wiki/Representational_State_Transfer" rel="nofollow">Representational State Transfer - Wikipedia </a></li><li><a shape="rect" class="external-link" href="http://oreilly.com/catalog/9780596801694/" rel="nofollow">RESTful Web Services Cookbook - Solutions for Improving Scalability and Simplicity</a> <em>by Subbu Allamarajuy</em> (O'Reilly Media, February 2010)</li><li><a shape="rect" class="external-link" href="http://oreilly.com/catalog/9780596158057/" rel="nofollow">RESTful Java with JAX-RS</a> <em>by Bill Burke</em> (O'Reilly Media, November 2009)</li><li><a shape="rect" class="exter
 nal-link" href="http://oreilly.com/catalog/9780596521134/" rel="nofollow">Java Web Services: Up and Running </a> <em>by Martin Kalin</em> (O'Reilly Media, February 2009)</li><li><a shape="rect" class="external-link" href="http://oreilly.com/catalog/9780596529260/" rel="nofollow">RESTful Web Services - Web services for the real world</a> <em>by Leonard Richardson, Sam Ruby</em> (O'Reilly Media, May 2007)</li><li><a shape="rect" class="external-link" href="http://www.oracle.com/technetwork/articles/javase/index-137171.html" rel="nofollow">RESTful Web Services</a> <em>by Sameer Tyagi</em> (Oracle , August 2006)</li><li><a shape="rect" class="external-link" href="http://www.crummy.com/writing/RESTful-Web-Services/" rel="nofollow">RESTful Web Services - "Unofficial homepage for a book about simple web services."</a> <em>Unknown</em></li><li><a shape="rect" class="external-link" href="http://tomayko.com/writings/rest-to-my-wife" rel="nofollow">How I Explained REST to My Wife</a> <em>by Ry
 an Tomayko</em> (<a shape="rect" class="external-link" href="http://tomayko.com" rel="nofollow">http://tomayko.com</a>, December 2004)</li></ul><h1 id="JAX-RS-Howtocontribute">How to contribute</h1><p>CXF JAX-RS implementation sits on top of the core CXF runtime and is quite self-contained and isolated from other CXF modules such as jaxws and simple frontends.</p><p>Please check the <a shape="rect" class="external-link" href="http://issues.apache.org/jira/secure/IssueNavigator.jspa?reset=true&amp;mode=hide&amp;pid=12310511&amp;sorter/order=DESC&amp;sorter/field=priority&amp;resolution=-1&amp;component=12311911">issue list</a> and see if you are interested in fixing one of the issues.</p><p>If you decide to go ahead then the fastest way to start is to</p><ul><li>do the fast trunk build using '<code>mvn install -Pfastinstall</code>'</li><li>setup the workspace 'mvn -Psetup.eclipse' which will create a workspace in a 'workspace' folder, next to 'trunk'</li><li>import cxf modules from t
 he trunk into the workspace and start working with the cxf-frontend-jaxrs module</li></ul><p>If you are about to submit a patch after building a trunk/rt/frontend/jaxrs, then please also run JAX-RS system tests in trunk/systests/jaxrs :<br clear="none"> <code>&gt; mvn install</code></p><p>You can also check out the general <a shape="rect" href="http://cxf.apache.org/getting-involved.html">Getting Involved</a> web page for more information on contributing.</p></div>
            </div>
            <!-- Content -->
          </td>



Mime
View raw message