cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From build...@apache.org
Subject svn commit: r905818 [3/3] - in /websites/production/cxf/content: cache/docs.pageCache docs/jax-rs-data-bindings.html docs/jax-rs-oauth2.html docs/jaxrs-services-configuration.html
Date Fri, 11 Apr 2014 14:48:25 GMT
Modified: websites/production/cxf/content/docs/jax-rs-oauth2.html
==============================================================================
--- websites/production/cxf/content/docs/jax-rs-oauth2.html (original)
+++ websites/production/cxf/content/docs/jax-rs-oauth2.html Fri Apr 11 14:48:25 2014
@@ -118,11 +118,11 @@ Apache CXF -- JAX-RS OAuth2
            <!-- Content -->
            <div class="wiki-content">
 <div id="ConfluenceContent"><h1 id="JAX-RSOAuth2-JAX-RS:OAuth2">JAX-RS: OAuth2</h1><p><style type="text/css">/*<![CDATA[*/
-div.rbtoc1396468209707 {padding: 0px;}
-div.rbtoc1396468209707 ul {list-style: disc;margin-left: 0px;}
-div.rbtoc1396468209707 li {margin-left: 0px;padding-left: 0px;}
+div.rbtoc1397227677908 {padding: 0px;}
+div.rbtoc1397227677908 ul {list-style: disc;margin-left: 0px;}
+div.rbtoc1397227677908 li {margin-left: 0px;padding-left: 0px;}
 
-/*]]>*/</style></p><div class="toc-macro rbtoc1396468209707">
+/*]]>*/</style></p><div class="toc-macro rbtoc1397227677908">
 <ul class="toc-indentation"><li><a shape="rect" href="#JAX-RSOAuth2-JAX-RS:OAuth2">JAX-RS: OAuth2</a></li><li><a shape="rect" href="#JAX-RSOAuth2-Introduction">Introduction</a></li><li><a shape="rect" href="#JAX-RSOAuth2-Mavendependencies">Maven dependencies</a></li><li><a shape="rect" href="#JAX-RSOAuth2-ClientRegistration">Client Registration</a></li><li><a shape="rect" href="#JAX-RSOAuth2-DevelopingOAuth2Servers">Developing OAuth2 Servers</a>
 <ul class="toc-indentation"><li><a shape="rect" href="#JAX-RSOAuth2-AuthorizationService">Authorization Service</a>
 <ul class="toc-indentation"><li><a shape="rect" href="#JAX-RSOAuth2-EndUserNameinAuthorizationForm">EndUser Name in Authorization Form</a></li><li><a shape="rect" href="#JAX-RSOAuth2-PublicClients(Devices)">Public Clients (Devices)</a>
@@ -137,7 +137,9 @@ div.rbtoc1396468209707 li {margin-left: 
 </li><li><a shape="rect" href="#JAX-RSOAuth2-TokenRevocationService">TokenRevocationService</a></li><li><a shape="rect" href="#JAX-RSOAuth2-SupportedGrants">Supported Grants</a>
 <ul class="toc-indentation"><li><a shape="rect" href="#JAX-RSOAuth2-AuthorizationCode">Authorization Code</a></li><li><a shape="rect" href="#JAX-RSOAuth2-Implicit">Implicit</a></li><li><a shape="rect" href="#JAX-RSOAuth2-ClientCredentials">Client Credentials</a></li><li><a shape="rect" href="#JAX-RSOAuth2-ResourceOwnerPasswordCredentials">Resource Owner Password Credentials</a></li><li><a shape="rect" href="#JAX-RSOAuth2-RefreshToken">Refresh Token</a></li><li><a shape="rect" href="#JAX-RSOAuth2-Assertions">Assertions</a></li><li><a shape="rect" href="#JAX-RSOAuth2-CustomGrants">Custom Grants</a></li></ul>
 </li><li><a shape="rect" href="#JAX-RSOAuth2-PreAuthorizedaccesstokens">PreAuthorized access tokens</a></li><li><a shape="rect" href="#JAX-RSOAuth2-Pre-registeredscopes">Pre-registered scopes</a></li><li><a shape="rect" href="#JAX-RSOAuth2-WritingOAuthDataProvider">Writing OAuthDataProvider</a></li><li><a shape="rect" href="#JAX-RSOAuth2-OAuthServerJAX-RSendpoints">OAuth Server JAX-RS endpoints</a></li></ul>
-</li><li><a shape="rect" href="#JAX-RSOAuth2-ThirdPartyClientAuthentication">Third Party Client Authentication</a></li><li><a shape="rect" href="#JAX-RSOAuth2-UserSessionAuthenticity">User Session Authenticity</a></li><li><a shape="rect" href="#JAX-RSOAuth2-CustomizingEndUserSubjectinitialization">Customizing End User Subject initialization</a></li><li><a shape="rect" href="#JAX-RSOAuth2-ProtectingresourceswithOAuthfilters">Protecting resources with OAuth filters</a></li><li><a shape="rect" href="#JAX-RSOAuth2-Howtogettheuserloginname">How to get the user login name</a></li><li><a shape="rect" href="#JAX-RSOAuth2-Client-sidesupport">Client-side support</a></li><li><a shape="rect" href="#JAX-RSOAuth2-OAuth2withouttheExplicitAuthorization">OAuth2 without the Explicit Authorization</a></li><li><a shape="rect" href="#JAX-RSOAuth2-OAuthWithoutaBrowser">OAuth Without a Browser</a></li><li><a shape="rect" href="#JAX-RSOAuth2-Reportingerrordetails">Reporting error details</a></li><li><a sha
 pe="rect" href="#JAX-RSOAuth2-Designconsiderations">Design considerations</a>
+</li><li><a shape="rect" href="#JAX-RSOAuth2-ThirdPartyClientAuthentication">Third Party Client Authentication</a></li><li><a shape="rect" href="#JAX-RSOAuth2-UserSessionAuthenticity">User Session Authenticity</a></li><li><a shape="rect" href="#JAX-RSOAuth2-CustomizingEndUserSubjectinitialization">Customizing End User Subject initialization</a></li><li><a shape="rect" href="#JAX-RSOAuth2-ProtectingresourceswithOAuthfilters">Protecting resources with OAuth filters</a>
+<ul class="toc-indentation"><li><a shape="rect" href="#JAX-RSOAuth2-OAuth2tokensandSOAPendpoints">OAuth2 tokens and SOAP endpoints</a></li></ul>
+</li><li><a shape="rect" href="#JAX-RSOAuth2-Howtogettheuserloginname">How to get the user login name</a></li><li><a shape="rect" href="#JAX-RSOAuth2-Client-sidesupport">Client-side support</a></li><li><a shape="rect" href="#JAX-RSOAuth2-OAuth2withouttheExplicitAuthorization">OAuth2 without the Explicit Authorization</a></li><li><a shape="rect" href="#JAX-RSOAuth2-OAuthWithoutaBrowser">OAuth Without a Browser</a></li><li><a shape="rect" href="#JAX-RSOAuth2-Reportingerrordetails">Reporting error details</a></li><li><a shape="rect" href="#JAX-RSOAuth2-Designconsiderations">Design considerations</a>
 <ul class="toc-indentation"><li><a shape="rect" href="#JAX-RSOAuth2-ControllingtheAccesstoResourceServer">Controlling the Access to Resource Server</a>
 <ul class="toc-indentation"><li><a shape="rect" href="#JAX-RSOAuth2-Sharingthesameaccesspathbetweenendusersandclients">Sharing the same access path between end users and clients</a></li><li><a shape="rect" href="#JAX-RSOAuth2-Providingdifferentaccesspointstoendusersandclients">Providing different access points to end users and clients</a></li></ul>
 </li><li><a shape="rect" href="#JAX-RSOAuth2-SingleSignOn">Single Sign On</a></li></ul>
@@ -459,7 +461,7 @@ Headers: 
   &lt;/jaxrs:providers&gt;
 &lt;/jaxrs:server&gt;
 ]]></script>
-</div></div><h1 id="JAX-RSOAuth2-Howtogettheuserloginname">How to get the user login name</h1><p>When one writes a custom server application which needs to participate in OAuth2 flows, the major question which needs to be addressed is<br clear="none"> how one can access a user login name that was used during the end-user authorizing the third-party client. This username will help to uniquely identify the resources that the 3rd party client is now attempting to access. The following code shows one way of how this can be done:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+</div></div><h2 id="JAX-RSOAuth2-OAuth2tokensandSOAPendpoints">OAuth2 tokens and SOAP endpoints</h2><p>&#160;</p><p>If you use HTTP Authorization header or WS-Security Binary token to pass OAuth2 tokens to SOAP endpoints then <a shape="rect" class="external-link" href="https://git-wip-us.apache.org/repos/asf?p=cxf.git;a=blob;f=rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/filters/OAuthRequestInterceptor.java;h=173fed36fc78db69c0d4afaee5d5f482dd4e05fd;hb=HEAD">OAuthRequestInterceptor</a> can be used to validate such tokens. It is OAuthRequestFilter running as CXF interceptor which will work OOB for tokens passed with Authorization header and it can be easily extended to support WS-Security binary tokens</p><h1 id="JAX-RSOAuth2-Howtogettheuserloginname">How to get the user login name</h1><p>When one writes a custom server application which needs to participate in OAuth2 flows, the major question which needs to be addressed is<br clear="none"> how o
 ne can access a user login name that was used during the end-user authorizing the third-party client. This username will help to uniquely identify the resources that the 3rd party client is now attempting to access. The following code shows one way of how this can be done:</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[ 
 import org.apache.cxf.rs.security.oauth2.utils.OAuthContextUtils;
 

Modified: websites/production/cxf/content/docs/jaxrs-services-configuration.html
==============================================================================
--- websites/production/cxf/content/docs/jaxrs-services-configuration.html (original)
+++ websites/production/cxf/content/docs/jaxrs-services-configuration.html Fri Apr 11 14:48:25 2014
@@ -118,14 +118,12 @@ Apache CXF -- JAXRS Services Configurati
          <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 Configuration </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 Configuration </span><p>&#160;</p><p>&#160;</p><p>&#160;</p><p><style type="text/css">/*<![CDATA[*/
+div.rbtoc1397227677440 {padding: 0px;}
+div.rbtoc1397227677440 ul {list-style: disc;margin-left: 0px;}
+div.rbtoc1397227677440 li {margin-left: 0px;padding-left: 0px;}
 
-<style type="text/css">/*<![CDATA[*/
-div.rbtoc1396468215647 {padding: 0px;}
-div.rbtoc1396468215647 ul {list-style: disc;margin-left: 0px;}
-div.rbtoc1396468215647 li {margin-left: 0px;padding-left: 0px;}
-
-/*]]>*/</style><div class="toc-macro rbtoc1396468215647">
+/*]]>*/</style></p><div class="toc-macro rbtoc1397227677440">
 <ul class="toc-indentation"><li><a shape="rect" href="#JAXRSServicesConfiguration-ConfiguringJAX-RSservicesprogrammatically">Configuring JAX-RS services programmatically</a></li><li><a shape="rect" href="#JAXRSServicesConfiguration-OSGI">OSGI</a>
 <ul class="toc-indentation"><li><a shape="rect" href="#JAXRSServicesConfiguration-Blueprint">Blueprint</a></li><li><a shape="rect" href="#JAXRSServicesConfiguration-Spring">Spring</a></li></ul>
 </li><li><a shape="rect" href="#JAXRSServicesConfiguration-ConfiguringJAX-RSendpointsprogrammaticallywithoutSpring">Configuring JAX-RS endpoints programmatically without Spring</a></li><li><a shape="rect" href="#JAXRSServicesConfiguration-ConfiguringJAX-RSservicesincontainerwithSpringconfigurationfile.">Configuring JAX-RS services in container with Spring configuration file.</a>
@@ -136,14 +134,11 @@ div.rbtoc1396468215647 li {margin-left: 
 <ul class="toc-indentation"><li><a shape="rect" href="#JAXRSServicesConfiguration-AttachingJAXRSendpointstoanexistingJettyserver">Attaching JAXRS endpoints to an existing Jetty server</a></li></ul>
 </li><li><a shape="rect" href="#JAXRSServicesConfiguration-JAX-RSRuntimeDelegateandApplications">JAX-RS RuntimeDelegate and Applications</a></li><li><a shape="rect" href="#JAXRSServicesConfiguration-ConfiguringJAX-RSservicesprogrammaticallywithSpringconfigurationfile.">Configuring JAX-RS services programmatically with Spring configuration file.</a></li><li><a shape="rect" href="#JAXRSServicesConfiguration-Lifecyclemanagement">Lifecycle management</a>
 <ul class="toc-indentation"><li><a shape="rect" href="#JAXRSServicesConfiguration-FromSpring">From Spring</a></li><li><a shape="rect" href="#JAXRSServicesConfiguration-WithCXFNonSpringJaxrsServlet">With CXFNonSpringJaxrsServlet</a></li><li><a shape="rect" href="#JAXRSServicesConfiguration-Programmatically">Programmatically</a></li><li><a shape="rect" href="#JAXRSServicesConfiguration-PostConstructandPreDestroy">PostConstruct and PreDestroy</a></li></ul>
-</li><li><a shape="rect" href="#JAXRSServicesConfiguration-Locatingcustomresourcesinwebapplications">Locating custom resources in web applications</a></li><li><a shape="rect" href="#JAXRSServicesConfiguration-Multipleendpointsandresourceclasses">Multiple endpoints and resource classes</a></li><li><a shape="rect" href="#JAXRSServicesConfiguration-Sharingprovidersbetweenmultipleendpoints">Sharing providers between multiple endpoints</a></li><li><a shape="rect" href="#JAXRSServicesConfiguration-DynamicservletsandasingleJAX-RSendpoint">Dynamic servlets and a single JAX-RS endpoint</a></li><li><a shape="rect" href="#JAXRSServicesConfiguration-ServletandApplicationContainerConfiguration">Servlet and Application Container Configuration</a></li></ul>
-</div>
-
-<h1 id="JAXRSServicesConfiguration-ConfiguringJAX-RSservicesprogrammatically">Configuring JAX-RS services programmatically</h1>
-
-<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[
-import org.apache.cxf.jaxrs.JAXRSServerFactoryBean;
+</li><li><a shape="rect" href="#JAXRSServicesConfiguration-Locatingcustomresourcesinwebapplications">Locating custom resources in web applications</a></li><li><a shape="rect" href="#JAXRSServicesConfiguration-Multipleendpointsandresourceclasses">Multiple endpoints and resource classes</a></li><li><a shape="rect" href="#JAXRSServicesConfiguration-Sharingprovidersbetweenmultipleendpoints">Sharing providers between multiple endpoints</a></li><li><a shape="rect" href="#JAXRSServicesConfiguration-DynamicservletsandasingleJAX-RSendpoint">Dynamic servlets and a single JAX-RS endpoint</a></li><li><a shape="rect" href="#JAXRSServicesConfiguration-Auto-discoveryofrootresourcesandproviders">Auto-discovery of root resources and providers</a>
+<ul class="toc-indentation"><li><a shape="rect" href="#JAXRSServicesConfiguration-Spring.1">Spring</a></li></ul>
+</li><li><a shape="rect" href="#JAXRSServicesConfiguration-ServletandApplicationContainerConfiguration">Servlet and Application Container Configuration</a></li></ul>
+</div><h1 id="JAXRSServicesConfiguration-ConfiguringJAX-RSservicesprogrammatically">Configuring JAX-RS services programmatically</h1><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[import org.apache.cxf.jaxrs.JAXRSServerFactoryBean;
 ...
 
 JAXRSServerFactoryBean sf = new JAXRSServerFactoryBean();
@@ -151,33 +146,18 @@ sf.setResourceClasses(CustomerService.cl
 sf.setAddress(&quot;http://localhost:9000/&quot;);
 sf.create();
 ]]></script>
-</div></div>
-
-<p>Some things to note:</p>
-<ul><li>The JAXRSServerFactoryBean creates a Server inside CXF which starts listening for requests on the URL specified.</li><li>Check the <a shape="rect" href="http://cxf.apache.org/javadoc/latest/org/apache/cxf/jaxrs/JAXRSServerFactoryBean.html">JAXRSServerFactoryBean API</a> for methods for adding multiple root resources</li><li>setResourceClasses() is for root resources only, use setProvider() or setProviders() for @Provider-annotated classes.</li><li>By default, the JAX-RS runtime is responsible for the lifecycle of resource classes, default lifecycle is per-request. You can set the lifecycle to singleton by using following line:
-<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[
-sf.setResourceProvider(BookStore.class, new SingletonResourceProvider(new BookStore()));
-]]></script>
-</div></div></li><li>If you prefer not to let the JAX-RS runtime handle the resource class lifecycle for you (for example, it might be the case that your resource class is created by other containers such as Spring), you can do the following:
-<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[
-JAXRSServerFactoryBean sf = new JAXRSServerFactoryBean();
+</div></div><p>Some things to note:</p><ul><li>The JAXRSServerFactoryBean creates a Server inside CXF which starts listening for requests on the URL specified.</li><li>Check the <a shape="rect" href="http://cxf.apache.org/javadoc/latest/org/apache/cxf/jaxrs/JAXRSServerFactoryBean.html">JAXRSServerFactoryBean API</a> for methods for adding multiple root resources</li><li>setResourceClasses() is for root resources only, use setProvider() or setProviders() for @Provider-annotated classes.</li><li><p>By default, the JAX-RS runtime is responsible for the lifecycle of resource classes, default lifecycle is per-request. You can set the lifecycle to singleton by using following line:</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[sf.setResourceProvider(BookStore.class, new SingletonResourceProvider(new BookStore()));
+]]></script>
+</div></div></li><li><p>If you prefer not to let the JAX-RS runtime handle the resource class lifecycle for you (for example, it might be the case that your resource class is created by other containers such as Spring), you can do the following:</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[JAXRSServerFactoryBean sf = new JAXRSServerFactoryBean();
 CustomerService cs = new CustomerService();
 sf.setServiceBeans(cs);
 sf.setAddress(&quot;http://localhost:9080/&quot;);
 sf.create();
 ]]></script>
-</div></div></li></ul>
-
-
-<h1 id="JAXRSServicesConfiguration-OSGI">OSGI</h1>
-
-<h2 id="JAXRSServicesConfiguration-Blueprint">Blueprint</h2>
-<p>The following example shows how to configure a JAX-RS endpoint in OSGI containers supporting Blueprint:</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;blueprint xmlns=&quot;http://www.osgi.org/xmlns/blueprint/v1.0.0&quot;
+</div></div></li></ul><h1 id="JAXRSServicesConfiguration-OSGI">OSGI</h1><h2 id="JAXRSServicesConfiguration-Blueprint">Blueprint</h2><p>The following example shows how to configure a JAX-RS endpoint in OSGI containers supporting Blueprint:</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;blueprint xmlns=&quot;http://www.osgi.org/xmlns/blueprint/v1.0.0&quot;
            xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot;
            xmlns:jaxws=&quot;http://cxf.apache.org/blueprint/jaxws&quot;
            xmlns:jaxrs=&quot;http://cxf.apache.org/blueprint/jaxrs&quot;
@@ -203,13 +183,8 @@ sf.create();
      &lt;bean id=&quot;serviceBean&quot; class=&quot;service.CustomerService&quot;/&gt;
 &lt;/blueprint&gt;
 ]]></script>
-</div></div>
-
-<h2 id="JAXRSServicesConfiguration-Spring">Spring</h2>
-
-<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=&quot;http://www.springframework.org/schema/beans&quot;
+</div></div><h2 id="JAXRSServicesConfiguration-Spring">Spring</h2><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=&quot;http://www.springframework.org/schema/beans&quot;
       xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot;
       xmlns:jaxrs=&quot;http://cxf.apache.org/jaxrs&quot;
       xsi:schemaLocation=&quot;
@@ -229,15 +204,8 @@ sf.create();
 &lt;/beans&gt;
 
 ]]></script>
-</div></div>
-
-<h1 id="JAXRSServicesConfiguration-ConfiguringJAX-RSendpointsprogrammaticallywithoutSpring">Configuring JAX-RS endpoints programmatically without Spring</h1>
-
-<p>Note that even though no Spring is explicitly used in the previous section, it is still used by default to have various CXF components registered with the bus such as transport factories. If no Spring libraries are available on the classpath then please follow the following 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[
-JAXRSServerFactoryBean sf = new JAXRSServerFactoryBean();
+</div></div><h1 id="JAXRSServicesConfiguration-ConfiguringJAX-RSendpointsprogrammaticallywithoutSpring">Configuring JAX-RS endpoints programmatically without Spring</h1><p>Note that even though no Spring is explicitly used in the previous section, it is still used by default to have various CXF components registered with the bus such as transport factories. If no Spring libraries are available on the classpath then please follow the following 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[JAXRSServerFactoryBean sf = new JAXRSServerFactoryBean();
 sf.setResourceClasses(CustomerService.class);
 sf.setResourceProvider(CustomerService.class, new SingletonResourceProvider(new CustomerService()));
 sf.setAddress(&quot;http://localhost:9000/&quot;);
@@ -247,19 +215,8 @@ factory.setBus(sf.getBus());
 manager.registerBindingFactory(JAXRSBindingFactory.JAXRS_BINDING_ID, factory);
 sf.create();
 ]]></script>
-</div></div> 
-
-<h1 id="JAXRSServicesConfiguration-ConfiguringJAX-RSservicesincontainerwithSpringconfigurationfile.">Configuring JAX-RS services in container with Spring configuration file.</h1>
-
-<h2 id="JAXRSServicesConfiguration-web.xml">web.xml</h2>
-
-<p>In web.xml one needs to register one or more CXFServlet(s) and link to an application context configuration.</p>
-
-<h3 id="JAXRSServicesConfiguration-UsingSpringContextLoaderListener">Using Spring ContextLoaderListener</h3>
-
-<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;?xml version=&quot;1.0&quot; encoding=&quot;ISO-8859-1&quot;?&gt;
+</div></div><h1 id="JAXRSServicesConfiguration-ConfiguringJAX-RSservicesincontainerwithSpringconfigurationfile.">Configuring JAX-RS services in container with Spring configuration file.</h1><h2 id="JAXRSServicesConfiguration-web.xml">web.xml</h2><p>In web.xml one needs to register one or more CXFServlet(s) and link to an application context configuration.</p><h3 id="JAXRSServicesConfiguration-UsingSpringContextLoaderListener">Using Spring ContextLoaderListener</h3><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;?xml version=&quot;1.0&quot; encoding=&quot;ISO-8859-1&quot;?&gt;
 
 &lt;!DOCTYPE web-app
     PUBLIC &quot;-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN&quot;
@@ -291,15 +248,8 @@ sf.create();
 	&lt;/servlet-mapping&gt;
 &lt;/web-app&gt;
 ]]></script>
-</div></div>
-
-<p>The application context configuration is shared between all the CXFServlets</p>
-
-<h3 id="JAXRSServicesConfiguration-UsingCXFServletinitparameters">Using CXFServlet init parameters </h3>
-
-<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;?xml version=&quot;1.0&quot; encoding=&quot;ISO-8859-1&quot;?&gt;
+</div></div><p>The application context configuration is shared between all the CXFServlets</p><h3 id="JAXRSServicesConfiguration-UsingCXFServletinitparameters">Using CXFServlet init parameters</h3><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;?xml version=&quot;1.0&quot; encoding=&quot;ISO-8859-1&quot;?&gt;
 
 &lt;!DOCTYPE web-app
     PUBLIC &quot;-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN&quot;
@@ -343,15 +293,8 @@ sf.create();
 	&lt;/servlet-mapping&gt;
 &lt;/web-app&gt;
 ]]></script>
-</div></div>
-
-<p>Each CXFServlet can get a unique application context configuration. Note, no Spring ContextLoaderListener is registered in web.xml in this case.</p>
-
-<h2 id="JAXRSServicesConfiguration-beans.xml">beans.xml</h2>
-
-<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;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
+</div></div><p>Each CXFServlet can get a unique application context configuration. Note, no Spring ContextLoaderListener is registered in web.xml in this case.</p><h2 id="JAXRSServicesConfiguration-beans.xml">beans.xml</h2><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;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
 &lt;beans xmlns=&quot;http://www.springframework.org/schema/beans&quot;
   xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot;
   xmlns:jaxrs=&quot;http://cxf.apache.org/jaxrs&quot;
@@ -375,20 +318,8 @@ http://cxf.apache.org/schemas/jaxrs.xsd&
   &lt;bean id=&quot;customerBean&quot; class=&quot;demo.jaxrs.server.CustomerService&quot; /&gt;
 &lt;/beans&gt;
 ]]></script>
-</div></div>
-
-<p>In the above configuration all resources will be configured as singletons, see <a shape="rect" href="#JAXRSServicesConfiguration-JAXRSServicesConfiguration-FromSpring">below</a> for information on creating per-request resources.</p>
-
-<h1 id="JAXRSServicesConfiguration-ConfiguringJAX-RSservicesusingexplicitbeanconfiguration">Configuring JAX-RS services using explicit bean configuration</h1>
-
-<p>Note that jaxrs:server (and jaxrs:client) declarations depend on 'http://cxf.apache.org/jaxrs' Spring NamespaceHandler be available on classpath. Sometimes, due to classloading restrictions or bugs in underlying containers which are exposed during complex deployments or due to multiple Spring libraries interfering with each other, NamespaceHandler can not be located and thus jaxrs endpoints can not be created. <br clear="none">
-Please report such issues to the team working on developing the container itself.</p>
-
-<p>If you need to do Spring configuration and get an error to do with a missing NamespaceHandler then, as a workaround, consider configuring jaxrs endpoints using CXF beans which actually handle the creation of jaxrs:server endpoints. This is marginally more complex, but overall, the configuration ends up being quite similar, for example, the above jaxrs:server endpoint can be configured like this instead:</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;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
+</div></div><p>In the above configuration all resources will be configured as singletons, see <a shape="rect" href="#JAXRSServicesConfiguration-JAXRSServicesConfiguration-FromSpring">below</a> for information on creating per-request resources.</p><h1 id="JAXRSServicesConfiguration-ConfiguringJAX-RSservicesusingexplicitbeanconfiguration">Configuring JAX-RS services using explicit bean configuration</h1><p>Note that jaxrs:server (and jaxrs:client) declarations depend on 'http://cxf.apache.org/jaxrs' Spring NamespaceHandler be available on classpath. Sometimes, due to classloading restrictions or bugs in underlying containers which are exposed during complex deployments or due to multiple Spring libraries interfering with each other, NamespaceHandler can not be located and thus jaxrs endpoints can not be created. <br clear="none"> Please report such issues to the team working on developing the container itself.</p><p>If you need to do Spring configuration and get an error to do with a 
 missing NamespaceHandler then, as a workaround, consider configuring jaxrs endpoints using CXF beans which actually handle the creation of jaxrs:server endpoints. This is marginally more complex, but overall, the configuration ends up being quite similar, for example, the above jaxrs:server endpoint can be configured like this instead:</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;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
 &lt;beans xmlns=&quot;http://www.springframework.org/schema/beans&quot;
   xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot;
   xsi:schemaLocation=&quot;
@@ -409,17 +340,8 @@ http://www.springframework.org/schema/be
 &lt;/beans&gt;
 
 ]]></script>
-</div></div>
-
-<h1 id="JAXRSServicesConfiguration-SpringAOP">Spring AOP</h1>
-
-<p>CXF JAX-RS is capable of working with AOP interceptors applied to resource classes from Spring.<br clear="none">
-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;beans xmlns:jaxrs=&quot;http://cxf.apache.org/jaxrs&quot; xmlns:aop=&quot;http://www.springframework.org/schema/aop&quot; 
+</div></div><h1 id="JAXRSServicesConfiguration-SpringAOP">Spring AOP</h1><p>CXF JAX-RS is capable of working with AOP interceptors applied to resource classes from Spring.<br clear="none"> 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;beans xmlns:jaxrs=&quot;http://cxf.apache.org/jaxrs&quot; xmlns:aop=&quot;http://www.springframework.org/schema/aop&quot; 
   xsi:schemaLocation=&quot; http://www.springframework.org/schema/beans
   http://www.springframework.org/schema/beans/spring-beans.xsd
   http://www.springframework.org/schema/aop  
@@ -452,16 +374,8 @@ For example:</p>
 &lt;/beans&gt;
 
 ]]></script>
-</div></div> 
-
-<p>Note that some AOP configuration is applied to two JAX-RS resource classes. By default Spring uses JDK dynamic proxies if a class to be proxified implements at least one interface or CGLIB proxies otherwise. </p>
-
-<p>For example, here's how org.apache.cxf.systest.jaxrs.BookStoreWithInterface looks like: </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 interface BookInterface {
+</div></div><p>Note that some AOP configuration is applied to two JAX-RS resource classes. By default Spring uses JDK dynamic proxies if a class to be proxified implements at least one interface or CGLIB proxies otherwise.</p><p>For example, here's how org.apache.cxf.systest.jaxrs.BookStoreWithInterface looks like:</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 interface BookInterface {
     @GET
     @Path(&quot;/thosebooks/{bookId}/&quot;)
     @Produces(&quot;application/xml&quot;)
@@ -483,25 +397,11 @@ public class BookStoreWithInterface exte
     }
 }
 ]]></script>
-</div></div>
-
-<p>In this case Spring will use a JDK dynamic proxy to wrap a BookStoreWithInterface class. As such it is important that the method which needs to be invoked such as getThatBook(...) will be part of the interface. </p>
-
-<p>The other method, getTheBook() can not be dispatched to by a JAX-RS runtime as it's not possible to discover it through a JDK proxy. If this method also needs to be invoked then this method should either be added to the interface or CGLIB proxies have to be explicitly enabled (consult Spring AOP documentation for more details). 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;aop:config proxy-target-class=&quot;true&quot;/&gt;
+</div></div><p>In this case Spring will use a JDK dynamic proxy to wrap a BookStoreWithInterface class. As such it is important that the method which needs to be invoked such as getThatBook(...) will be part of the interface.</p><p>The other method, getTheBook() can not be dispatched to by a JAX-RS runtime as it's not possible to discover it through a JDK proxy. If this method also needs to be invoked then this method should either be added to the interface or CGLIB proxies have to be explicitly enabled (consult Spring AOP documentation for more details). 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;aop:config proxy-target-class=&quot;true&quot;/&gt;
 ]]></script>
-</div></div>
-
-
-<h1 id="JAXRSServicesConfiguration-ConfiguringJAX-RSservicesincontainerwithoutSpring">Configuring JAX-RS services in container without Spring</h1>
-
-<p>If you prefer, you can register JAX-RS endpoints without depending on Spring with the help of CXFNonSpringJaxrsServlet :</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;servlet&gt;
+</div></div><h1 id="JAXRSServicesConfiguration-ConfiguringJAX-RSservicesincontainerwithoutSpring">Configuring JAX-RS services in container without Spring</h1><p>If you prefer, you can register JAX-RS endpoints without depending on Spring with the help of CXFNonSpringJaxrsServlet :</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;servlet&gt;
  &lt;servlet-name&gt;CXFServlet&lt;/servlet-name&gt;
  &lt;display-name&gt;CXF Servlet&lt;/display-name&gt;
  &lt;servlet-class&gt;
@@ -562,17 +462,8 @@ public class BookStoreWithInterface exte
 &lt;load-on-startup&gt;1&lt;/load-on-startup&gt;
 &lt;/servlet&gt;
 ]]></script>
-</div></div>
-
-<p>When service classes and providers are registered this way, the default life-cycle is 'singleton'. You can override it by setting a "jaxrs.scope" parameter with the value of 'prototype' (equivalent to per-request). <br clear="none">
-By default, the endpoint address is "/". One can provide a more specific value using a "jaxrs.address" parameter.</p>
-
-<p>If the referenced service classes are not annotated with JAX-RS annotations then an external user model can also be linked 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;servlet&gt;
+</div></div><p>When service classes and providers are registered this way, the default life-cycle is 'singleton'. You can override it by setting a "jaxrs.scope" parameter with the value of 'prototype' (equivalent to per-request). <br clear="none"> By default, the endpoint address is "/". One can provide a more specific value using a "jaxrs.address" parameter.</p><p>If the referenced service classes are not annotated with JAX-RS annotations then an external user model can also be linked 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;servlet&gt;
  &lt;servlet-name&gt;CXFServlet&lt;/servlet-name&gt;
  &lt;display-name&gt;CXF Servlet&lt;/display-name&gt;
  &lt;servlet-class&gt;
@@ -594,14 +485,8 @@ By default, the endpoint address is "/".
  &lt;load-on-startup&gt;1&lt;/load-on-startup&gt;
 &lt;/servlet&gt;
 ]]></script>
-</div></div>
-
-<p>A more portable way to register resource classes and providers with CXFNonSpringJaxrsServlet is to use a JAX-RS Application <a shape="rect" class="external-link" href="http://svn.apache.org/repos/asf/cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/BookApplication.java">implementation</a> :</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;servlet&gt;
+</div></div><p>A more portable way to register resource classes and providers with CXFNonSpringJaxrsServlet is to use a JAX-RS Application <a shape="rect" class="external-link" href="http://svn.apache.org/repos/asf/cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/BookApplication.java">implementation</a> :</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;servlet&gt;
  &lt;servlet-name&gt;CXFServlet&lt;/servlet-name&gt;
  &lt;display-name&gt;CXF Servlet&lt;/display-name&gt;
  &lt;servlet-class&gt;
@@ -624,15 +509,8 @@ By default, the endpoint address is "/".
 &lt;load-on-startup&gt;1&lt;/load-on-startup&gt;
 &lt;/servlet&gt;
 ]]></script>
-</div></div>
-
-<p>Note that Application.getClasses() method returns a set of per-request resource class names. Application.getSingletons() returns a list of singleton resource and provider classes. </p>
-
-<p>Starting from CXF 2.3.7/2.4.3/2.5.0 it is possible to simple properties for resource and Application classes, providers and interceptors:</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;servlet&gt;
+</div></div><p>Note that Application.getClasses() method returns a set of per-request resource class names. Application.getSingletons() returns a list of singleton resource and provider classes.</p><p>Starting from CXF 2.3.7/2.4.3/2.5.0 it is possible to simple properties for resource and Application classes, providers and interceptors:</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;servlet&gt;
  &lt;servlet-name&gt;CXFServlet&lt;/servlet-name&gt;
  &lt;display-name&gt;CXF Servlet&lt;/display-name&gt;
  &lt;servlet-class&gt;
@@ -648,14 +526,8 @@ By default, the endpoint address is "/".
  &lt;load-on-startup&gt;1&lt;/load-on-startup&gt;
 &lt;/servlet&gt;
 ]]></script>
-</div></div>
-
-<p>In the above example, org.apache.cxf.systest.jaxrs.BookApplication is expected to have setName and setId setters, with a single primitive or List parameter type. </p>
-
-<p><strong>Note</strong> that having the web-app_2_3.dtd DTD referenced from web.xml will likely prevent 'param-value' containing spaces and make it difficult to specify multiple providers 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;init-param&gt;
+</div></div><p>In the above example, org.apache.cxf.systest.jaxrs.BookApplication is expected to have setName and setId setters, with a single primitive or List parameter type.</p><p><strong>Note</strong> that having the web-app_2_3.dtd DTD referenced from web.xml will likely prevent 'param-value' containing spaces and make it difficult to specify multiple providers 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;init-param&gt;
   &lt;param-name&gt;jaxrs.providers&lt;/param-name&gt;
   &lt;param-value&gt;
     mypackage.Provider1 
@@ -665,17 +537,8 @@ By default, the endpoint address is "/".
  &lt;load-on-startup&gt;1&lt;/load-on-startup&gt;
 &lt;/servlet&gt;
 ]]></script>
-</div></div>
-
-<p>In such cases consider moving to the web-app 2.5 schema or extending CXFNonSpringJaxrsProviders or introducing an Application.  </p>
-
-<h2 id="JAXRSServicesConfiguration-AttachingJAXRSendpointstoanexistingJettyserver">Attaching JAXRS endpoints to an existing Jetty server</h2>
-
-<p>Here is a code fragment showing how it can be done with the help of CxfNonSpringJaxrsServlet :</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[
-CXFNonSpringJAXRSServlet cxf = new CXFNonSpringJaxrsServlet();
+</div></div><p>In such cases consider moving to the web-app 2.5 schema or extending CXFNonSpringJaxrsProviders or introducing an Application.</p><h2 id="JAXRSServicesConfiguration-AttachingJAXRSendpointstoanexistingJettyserver">Attaching JAXRS endpoints to an existing Jetty server</h2><p>Here is a code fragment showing how it can be done with the help of CxfNonSpringJaxrsServlet :</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[CXFNonSpringJAXRSServlet cxf = new CXFNonSpringJaxrsServlet();
 
 ...
 
@@ -686,16 +549,8 @@ servlet.setForcedPath(&quot;services&quo
 root.addServlet(servlet, &quot;/*&quot;);
 
 ]]></script>
-</div></div>
-
-<h1 id="JAXRSServicesConfiguration-JAX-RSRuntimeDelegateandApplications">JAX-RS RuntimeDelegate and Applications</h1>
-
-<p>If you have a JAX-RS Application implementation available and would like to minimize the interaction with the CXF JAX-RS specific API, you may want to use the JAX-RS RuntimeDelegate :</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[
-
-import javax.ws.rs.ext.RuntimeDelegate;
+</div></div><h1 id="JAXRSServicesConfiguration-JAX-RSRuntimeDelegateandApplications">JAX-RS RuntimeDelegate and Applications</h1><p>If you have a JAX-RS Application implementation available and would like to minimize the interaction with the CXF JAX-RS specific API, you may want to use the JAX-RS RuntimeDelegate :</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[import javax.ws.rs.ext.RuntimeDelegate;
 import org.apache.cxf.endpoint.Server;
 import org.apache.cxf.jaxrs.JAXRSServerFactoryBean;
 
@@ -713,44 +568,22 @@ server.start();
 server.stop();
 
 ]]></script>
-</div></div>
-
-<p>Note that the above code makes sure an @ApplicationPath value (if CustomApplication has this annotation) is taken into account.</p>
-
-<h1 id="JAXRSServicesConfiguration-ConfiguringJAX-RSservicesprogrammaticallywithSpringconfigurationfile.">Configuring JAX-RS services programmatically with Spring configuration file. </h1>
-
-<p>When using Spring explicitly in your code, you may want to follow this 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[
-ClassPathXmlApplicationContext ctx = new ClassPathXmlApplicationContext(new String[]
+</div></div><p>Note that the above code makes sure an @ApplicationPath value (if CustomApplication has this annotation) is taken into account.</p><h1 id="JAXRSServicesConfiguration-ConfiguringJAX-RSservicesprogrammaticallywithSpringconfigurationfile.">Configuring JAX-RS services programmatically with Spring configuration file.</h1><p>When using Spring explicitly in your code, you may want to follow this 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[ClassPathXmlApplicationContext ctx = new ClassPathXmlApplicationContext(new String[]
                       {&quot;/org/apache/cxf/jaxrs/spring/servers.xml&quot;});
 
 // &#39;simple&#39; is the id of the jaxrs server bean
 JAXRSServerFactoryBean sfb = (JAXRSServerFactoryBean)ctx.getBean(&quot;simple&quot;);
 sfb.create();
 ]]></script>
-</div></div>
-
-<p>Note that in in this case your Spring configuration file should import cxf-extension-http-jetty.xml instead of cxf-servlet.xml :</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 in in this case your Spring configuration file should import cxf-extension-http-jetty.xml instead of cxf-servlet.xml :</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;!--
 &lt;import resource=&quot;classpath:META-INF/cxf/cxf-servlet.xml&quot; /&gt;
 --&gt;
 &lt;import resource=&quot;classpath:META-INF/cxf/cxf-extension-http-jetty.xml&quot; /&gt;
 ]]></script>
-</div></div>
-
-<h1 id="JAXRSServicesConfiguration-Lifecyclemanagement">Lifecycle management</h1>
-
-<h2 id="JAXRSServicesConfiguration-FromSpring">From Spring</h2>
-
-<p>By default, the service beans which are referenced directly from the jaxrs:server endpoint declarations are treated by the runtime as singleton JAX-RS root resources. 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;beans&gt;
+</div></div><h1 id="JAXRSServicesConfiguration-Lifecyclemanagement">Lifecycle management</h1><h2 id="JAXRSServicesConfiguration-FromSpring">From Spring</h2><p>By default, the service beans which are referenced directly from the jaxrs:server endpoint declarations are treated by the runtime as singleton JAX-RS root resources. 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;beans&gt;
   &lt;jaxrs:server id=&quot;customerService&quot; address=&quot;/service1&quot;&gt;
     &lt;jaxrs:serviceBeans&gt;
       &lt;ref bean=&quot;customerBean&quot; /&gt;
@@ -764,17 +597,8 @@ sfb.create();
   &lt;bean id=&quot;customerBean&quot; class=&quot;demo.jaxrs.server.CustomerService&quot; /&gt;
 &lt;/beans&gt;
 ]]></script>
-</div></div>
-
-<p>Spring instantiates and injects the customerBean reference and the runtime will access this reference directly afterwards. Effectively, the scope attribute which may be present on the customerBean bean declaration is ignored in this case, <strong>unless the Spring AOP is used to enforce the required scope</strong> (see below for more information). </p>
-
-<p>The 'serviceFactories' element or beanNames attribute has to be used for a 'prototype', 'request' and other Spring bean scopes be supported.</p>
-
-<p>For example, the serviceFactories element can reference one or more beans of type 'org.apache.cxf.jaxrs.spring.SpringResourceFactory' which in turn reference the actual service beans.   </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&gt;
+</div></div><p>Spring instantiates and injects the customerBean reference and the runtime will access this reference directly afterwards. Effectively, the scope attribute which may be present on the customerBean bean declaration is ignored in this case, <strong>unless the Spring AOP is used to enforce the required scope</strong> (see below for more information).</p><p>The 'serviceFactories' element or beanNames attribute has to be used for a 'prototype', 'request' and other Spring bean scopes be supported.</p><p>For example, the serviceFactories element can reference one or more beans of type 'org.apache.cxf.jaxrs.spring.SpringResourceFactory' which in turn reference the actual service beans.</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&gt;
   &lt;jaxrs:server id=&quot;customerService&quot; address=&quot;/service1&quot;&gt;
     &lt;jaxrs:serviceFactories&gt;
       &lt;ref bean=&quot;sfactory1&quot; /&gt;
@@ -793,16 +617,8 @@ sfb.create();
   &lt;bean id=&quot;customerBean2&quot; class=&quot;demo.jaxrs.server.CustomerRootResource2&quot;  scope=&quot;prototype&quot;/&gt; 
 &lt;/beans&gt;
 ]]></script>
-</div></div>
-
-<p>In this example, the jaxrs:server endpoint has two JAX-RS root resources (customerBean1 and customerBean2) with the Spring 'prototype' scope.<br clear="none">
-Other scopes can also be supported.</p>
-
-<p>If using the jaxrs:serviceFactories element seems a bit verbose then the 'beanNames' attribute can be used instead:</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&gt;
+</div></div><p>In this example, the jaxrs:server endpoint has two JAX-RS root resources (customerBean1 and customerBean2) with the Spring 'prototype' scope.<br clear="none"> Other scopes can also be supported.</p><p>If using the jaxrs:serviceFactories element seems a bit verbose then the 'beanNames' attribute can be used instead:</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&gt;
   &lt;jaxrs:server id=&quot;customerService&quot; address=&quot;/service1&quot;
     beanNames=&quot;customerBean1 customerBean2&quot;/&gt;
   
@@ -810,15 +626,8 @@ Other scopes can also be supported.</p>
   &lt;bean id=&quot;customerBean2&quot; class=&quot;demo.jaxrs.server.CustomerRootResource2&quot;  scope=&quot;prototype&quot;/&gt; 
 &lt;/beans&gt;
 ]]></script>
-</div></div>
-
-<p>The beanNames attribute lists the names/ids of service beans separated by space. The jaxrs:serviceFactories element has to be used when users register custom CXF JAX-RS <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/lifecycle/ResourceProvider.java">ResourceProvider</a> implementations.</p>
-
-<p>Another approach toward supporting complex scopes in Spring is to use Spring AOP. For example, the following fragment shows how to have the Spring "request" scope supported:</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
+</div></div><p>The beanNames attribute lists the names/ids of service beans separated by space. The jaxrs:serviceFactories element has to be used when users register custom CXF JAX-RS <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/lifecycle/ResourceProvider.java">ResourceProvider</a> implementations.</p><p>Another approach toward supporting complex scopes in Spring is to use Spring AOP. For example, the following fragment shows how to have the Spring "request" scope supported:</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=&quot;http://www.springframework.org/schema/beans&quot;
 	xmlns:aop=&quot;http://www.springframework.org/schema/aop&quot;
 	xmlns:jaxrs=&quot;http://cxf.apache.org/jaxrs&quot;
@@ -842,23 +651,13 @@ Other scopes can also be supported.</p>
 	&lt;/jaxrs:server&gt;
 &lt;/beans&gt;
 ]]></script>
-</div></div>
-
-<p>in addition, the following servlet listener has to be added to the web.xml:</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;listener&gt;
+</div></div><p>in addition, the following servlet listener has to be added to the web.xml:</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;listener&gt;
     &lt;listener-class&gt;org.springframework.web.context.request.RequestContextListener&lt;/listener-class&gt;
 &lt;/listener&gt;
 ]]></script>
-</div></div>
-
-<p>The request-scoped service bean instances (example, org.apache.cxf.systest.jaxrs.CustomerService instances) are not actually available at the initialization time thus one limitation of the above configuration is that it is not possible to inject JAX-RS contexts into these service beans. This is not a show-stopper because contexts such as UriInfo can be passed in as resource method parameters. However, if the injection into the fields or via method setters is required then a little customization of the org.apache.cxf.jaxrs.spring.SpringResourceFactory will do the trick. Particularly, the Spring ApplicationContext reports that a request-scoped bean is a singleton but the JAX-RS runtime can not inject thread-local proxies given that the actual instance is not available as explained above; in fact, the request-scoped beans are not really JAX-RS singletons. Thus a simple custom factory like <a shape="rect" class="external-link" href="http://svn.apache.org/repos/asf/cxf/trunk/systests/
 jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/RequestScopeResourceFactory.java">this one</a> is needed and it has to be used the following way:</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&gt;
+</div></div><p>The request-scoped service bean instances (example, org.apache.cxf.systest.jaxrs.CustomerService instances) are not actually available at the initialization time thus one limitation of the above configuration is that it is not possible to inject JAX-RS contexts into these service beans. This is not a show-stopper because contexts such as UriInfo can be passed in as resource method parameters. However, if the injection into the fields or via method setters is required then a little customization of the org.apache.cxf.jaxrs.spring.SpringResourceFactory will do the trick. Particularly, the Spring ApplicationContext reports that a request-scoped bean is a singleton but the JAX-RS runtime can not inject thread-local proxies given that the actual instance is not available as explained above; in fact, the request-scoped beans are not really JAX-RS singletons. Thus a simple custom factory like <a shape="rect" class="external-link" href="http://svn.apache.org/repos/asf/cxf/tru
 nk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/RequestScopeResourceFactory.java">this one</a> is needed and it has to be used the following way:</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&gt;
   &lt;jaxrs:server id=&quot;customerService&quot; address=&quot;/service1&quot;&gt;
     &lt;jaxrs:serviceFactories&gt;
        &lt;bean class=&quot;org.apache.cxf.systest.jaxrs.RequestScopeResourceFactory&quot;&gt;
@@ -870,62 +669,21 @@ Other scopes can also be supported.</p>
   &lt;bean id=&quot;customerBean&quot; class=&quot;org.apache.cxf.systest.jaxrs.CustomerService&quot; scope=&quot;request&quot;&gt;&lt;aop:scoped-proxy /&gt;&lt;/bean&gt;
 &lt;/beans&gt;
 ]]></script>
-</div></div>
-
-<p>The above configuration makes sure that the CXF JAX-RS runtime injects the values at the request time given that the customerBean bean is not seen as a JAX-RS singleton. This approach is only needed if the injection of contexts is required.</p>
-
-<h2 id="JAXRSServicesConfiguration-WithCXFNonSpringJaxrsServlet">With CXFNonSpringJaxrsServlet</h2>
-
-<p>CXFNonSpringJaxrsServlet uses 'Singleton' as a default scope for service classes specified by a "jaxrs.serviceClasses" servlet parameter. It can be overridden by setting a "jaxrs.scope" parameter to a "prototype" value or by not using the "jaxrs.serviceClasses" parameter at all and registering a JAXRS Application implementation instead. Please see the section describing CXFNonSpringJaxrsServlet for more details.</p>
-
-<p>CXFNonSpringJaxrsServlet can support singleton scopes for classes with constructors expecting JAXRS contexts, at the moment it can only inject ServletContext or ServletConfig contexts :</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;/&quot;)
+</div></div><p>The above configuration makes sure that the CXF JAX-RS runtime injects the values at the request time given that the customerBean bean is not seen as a JAX-RS singleton. This approach is only needed if the injection of contexts is required.</p><h2 id="JAXRSServicesConfiguration-WithCXFNonSpringJaxrsServlet">With CXFNonSpringJaxrsServlet</h2><p>CXFNonSpringJaxrsServlet uses 'Singleton' as a default scope for service classes specified by a "jaxrs.serviceClasses" servlet parameter. It can be overridden by setting a "jaxrs.scope" parameter to a "prototype" value or by not using the "jaxrs.serviceClasses" parameter at all and registering a JAXRS Application implementation instead. Please see the section describing CXFNonSpringJaxrsServlet for more details.</p><p>CXFNonSpringJaxrsServlet can support singleton scopes for classes with constructors expecting JAXRS contexts, at the moment it can only inject ServletContext or ServletConfig contexts :</p><div class="code panel pd
 l" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[@Path(&quot;/&quot;)
 public class SingletonResourceClass {
    public SingletonResourceClass(@Context ServletContext context, @Context ServletConfig context2) {}
 }
 ]]></script>
-</div></div> 
-
-<h2 id="JAXRSServicesConfiguration-Programmatically">Programmatically</h2>
-
-<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[
-JAXRSServerFactoryBean sf = new JAXRSServerFactoryBean();
+</div></div><h2 id="JAXRSServicesConfiguration-Programmatically">Programmatically</h2><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[JAXRSServerFactoryBean sf = new JAXRSServerFactoryBean();
 sf.setResourceClass(CustomerService.class);
 sf.setResourceProvider(new SingletonResourceProvider(new CustomerService()));
 sf.setResourceClass(CustomerService2.class);
 sf.setResourceProvider(new PerRequestResourceProvider(CustomerService.class));
 ]]></script>
-</div></div>
-
-<h2 id="JAXRSServicesConfiguration-PostConstructandPreDestroy">PostConstruct and PreDestroy</h2>
-
-<p>Bean methods annotated with @PostConstruct and @PreDestroy annotations will be called as expected by the scope rules. <br clear="none">
-Singleton beans will have their postconstruct method called when the endpoint is created. If a given singleton resource instance was created by Spring then its predestroy method will also be called after, for example, the web application which uses it is about to be unloaded. At the moment singletons created by CXFNonSpringJaxrsServlet or programmatically will only have their postconstruct method (if any) called.  </p>
-
-<p>Prototype beans will have their postconstruct and predestroy method called before a resource method is invoked and immediately after the invocation has returned but before the response has actually been serialized. You can indicate that the predestroy method has to be called after the request has completely gone out of scope (that is after the response body if any has been written to the output stream) by adding an "org.apache.cxf.jaxrs.service.scope" property with the value set to "request".</p>
-
-<p>You can also register a custom Spring resource factory by extending org.apache.cxf.jaxrs.spring.SpringResourceFactory or providing a more sophisticated implementation.</p>
-
-<h1 id="JAXRSServicesConfiguration-Locatingcustomresourcesinwebapplications">Locating custom resources in web applications</h1>
-
-<p>Resources like schemas, custom XSLT templates and user models are typically referenced using a classpath: prefix. Thus one can add them to a WEB-INF/classes folder in a given web application.<br clear="none">
-Since CXF 2.2.3 one can put them directly under WEB-INF, for example into WEB-INF/xslt,  WEB-INF/schemas, WEB-INF/model and referencing them like 'classpath:/WEB-INF/xslt/template.xsl'.</p>
-
-<h1 id="JAXRSServicesConfiguration-Multipleendpointsandresourceclasses">Multiple endpoints and resource classes</h1>
-
-<p>One can configure as many jaxrs:server endpoints as needed for a given application, with every endpoint possibly providing an alternative path to a single resource bean. Every endpoint can employ as many shared or unique resource classes as needed, and have common or different providers.  </p>
-
-<h1 id="JAXRSServicesConfiguration-Sharingprovidersbetweenmultipleendpoints">Sharing providers between multiple endpoints</h1>
-
-<p>One way to share multiple providers between multiple endpoints is to refer to the same provider bean from within jaxrs:provider sections:</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&gt;
+</div></div><h2 id="JAXRSServicesConfiguration-PostConstructandPreDestroy">PostConstruct and PreDestroy</h2><p>Bean methods annotated with @PostConstruct and @PreDestroy annotations will be called as expected by the scope rules. <br clear="none"> Singleton beans will have their postconstruct method called when the endpoint is created. If a given singleton resource instance was created by Spring then its predestroy method will also be called after, for example, the web application which uses it is about to be unloaded. At the moment singletons created by CXFNonSpringJaxrsServlet or programmatically will only have their postconstruct method (if any) called.</p><p>Prototype beans will have their postconstruct and predestroy method called before a resource method is invoked and immediately after the invocation has returned but before the response has actually been serialized. You can indicate that the predestroy method has to be called after the request has completely gone out of scope 
 (that is after the response body if any has been written to the output stream) by adding an "org.apache.cxf.jaxrs.service.scope" property with the value set to "request".</p><p>You can also register a custom Spring resource factory by extending org.apache.cxf.jaxrs.spring.SpringResourceFactory or providing a more sophisticated implementation.</p><h1 id="JAXRSServicesConfiguration-Locatingcustomresourcesinwebapplications">Locating custom resources in web applications</h1><p>Resources like schemas, custom XSLT templates and user models are typically referenced using a classpath: prefix. Thus one can add them to a WEB-INF/classes folder in a given web application.<br clear="none"> Since CXF 2.2.3 one can put them directly under WEB-INF, for example into WEB-INF/xslt, WEB-INF/schemas, WEB-INF/model and referencing them like 'classpath:/WEB-INF/xslt/template.xsl'.</p><h1 id="JAXRSServicesConfiguration-Multipleendpointsandresourceclasses">Multiple endpoints and resource classes</h1><p>One
  can configure as many jaxrs:server endpoints as needed for a given application, with every endpoint possibly providing an alternative path to a single resource bean. Every endpoint can employ as many shared or unique resource classes as needed, and have common or different providers.</p><h1 id="JAXRSServicesConfiguration-Sharingprovidersbetweenmultipleendpoints">Sharing providers between multiple endpoints</h1><p>One way to share multiple providers between multiple endpoints is to refer to the same provider bean from within jaxrs:provider sections:</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&gt;
   &lt;jaxrs:server id=&quot;customerService&quot; address=&quot;/service1&quot;&gt;
     &lt;jaxrs:serviceBeans&gt;
       &lt;bean class=&quot;org.apache.cxf.systest.jaxrs.CustomerService&quot;/&gt;
@@ -949,13 +707,8 @@ Since CXF 2.2.3 one can put them directl
 &lt;/beans&gt;
 
 ]]></script>
-</div></div>
-
-<p>Starting from CXF 2.7.2 it is possible to register provider directly on the bus as the bus properties and share them between all the providers using this bus:</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&gt;
+</div></div><p>Starting from CXF 2.7.2 it is possible to register provider directly on the bus as the bus properties and share them between all the providers using this bus:</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&gt;
   
   &lt;cxf:bus&gt;
         &lt;cxf:properties&gt;
@@ -979,17 +732,8 @@ Since CXF 2.2.3 one can put them directl
   
   &lt;/beans&gt;
 ]]></script>
-</div></div>
-
-<p>Note a global exception mapper has been registered using the name of interface, "javax.ws.rs.ext.ExceptionMapper", which all the exception mappers have to implement. </p>
-
-<p>Note that once can register global per-bus providers using "javax.ws.rs.ext.ExceptionMapper", "javax.ws.rs.ext.MessageBodyReader" or "javax.ws.rs.ext.MessageBodyWriter" bus properties with the registered providers expected to implement either of these interfaces. </p>
-
-<p>Alternatively, one can have all the providers (JAX-RS and CXF-specific) registered with a bus using "org.apache.cxf.jaxrs.bus.providers" list property:</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:util=&quot;http://www.springframework.org/schema/util&quot;&gt;
+</div></div><p>Note a global exception mapper has been registered using the name of interface, "javax.ws.rs.ext.ExceptionMapper", which all the exception mappers have to implement.</p><p>Note that once can register global per-bus providers using "javax.ws.rs.ext.ExceptionMapper", "javax.ws.rs.ext.MessageBodyReader" or "javax.ws.rs.ext.MessageBodyWriter" bus properties with the registered providers expected to implement either of these interfaces.</p><p>Alternatively, one can have all the providers (JAX-RS and CXF-specific) registered with a bus using "org.apache.cxf.jaxrs.bus.providers" list property:</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:util=&quot;http://www.springframework.org/schema/util&quot;&gt;
   
   &lt;cxf:bus&gt;
         &lt;cxf:properties&gt;
@@ -1021,17 +765,8 @@ Since CXF 2.2.3 one can put them directl
   
   &lt;/beans&gt;
 ]]></script>
-</div></div>
-
-<h1 id="JAXRSServicesConfiguration-DynamicservletsandasingleJAX-RSendpoint">Dynamic servlets and a single JAX-RS endpoint</h1>
-
-<p>Note: this is not required by default starting from CXF 3.0.0-milestone1</p>
-
-<p>In some advanced cases you may want to dynamically add new servlets (CXFServlet or CXFNonSpringJaxrsServlet) with all of them serving the same JAX-RS endpoints. In this case you most likely want to configure servlets so that the CXF endpoint address is not overridden :</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[
-{code:xml}
+</div></div><h1 id="JAXRSServicesConfiguration-DynamicservletsandasingleJAX-RSendpoint">Dynamic servlets and a single JAX-RS endpoint</h1><p>Note: this is not required by default starting from CXF 3.0.0-milestone1</p><p>In some advanced cases you may want to dynamically add new servlets (CXFServlet or CXFNonSpringJaxrsServlet) with all of them serving the same JAX-RS endpoints. In this case you most likely want to configure servlets so that the CXF endpoint address is not overridden :</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[{code:xml}
 &lt;servlet&gt;
  &lt;servlet-name&gt;CXFServlet&lt;/servlet-name&gt;
  &lt;display-name&gt;CXF Servlet&lt;/display-name&gt;
@@ -1049,15 +784,35 @@ Since CXF 2.2.3 one can put them directl
  &lt;load-on-startup&gt;1&lt;/load-on-startup&gt;
 &lt;/servlet&gt;
 ]]></script>
-</div></div>
+</div></div><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[ ]]></script>
+</div></div><h1 id="JAXRSServicesConfiguration-Auto-discoveryofrootresourcesandproviders">Auto-discovery of root resources and providers</h1><p>Starting from CXF 3.0.0 it is possible to enable the auto-discovery of JAX-RS roots and providers with the regular CXF JAX-RS endpoint declarations done in XML . Currently it is only possible with Spring. Patch supporting it for Blueprint is available and will be dealt with asap.</p><pre>&#160;</pre><h2 id="JAXRSServicesConfiguration-Spring.1">Spring</h2><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=&quot;http://www.springframework.org/schema/beans&quot;
+      xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot;
+      xmlns:jaxrs=&quot;http://cxf.apache.org/jaxrs&quot;
+      xsi:schemaLocation=&quot;
+         http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
+         http://cxf.apache.org/jaxrs http://cxf.apache.org/schemas/jaxrs.xsd&quot;&gt;
 
-<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[]]></script>
-</div></div>
+     &lt;import resource=&quot;classpath:META-INF/cxf/cxf.xml&quot; /&gt;
+     
+     &lt;!-- 
+         Discover all root resources and providers in packages starting from &quot;a.b.c&quot; 
+     --&gt;
+     &lt;jaxrs:server address=&quot;/customers&quot; basePackages=&quot;a.b.c&quot;/&gt;
+
+     &lt;!-- 
+       Discover a root resource and providers in packages starting from &quot;a.b.c&quot; and &quot;d.e.f&quot;,
+       Note that in case of jaxrs:client, having multiple discoverable root resources can lead to
+       unexpected results, as only the single root can be recognized 
+     --&gt;
+     &lt;jaxrs:client address=&quot;http://customers&quot; basePackages=&quot;a.b.c,d.e.f&quot;/&gt;
 
-<h1 id="JAXRSServicesConfiguration-ServletandApplicationContainerConfiguration">Servlet and Application Container Configuration</h1>
+      
+&lt;/beans&gt;
 
-<p>Please see this <a shape="rect" href="https://cwiki.apache.org/confluence/display/CXF20DOC/JAX-RS+Deployment">page</a> for more information.</p></div>
+]]></script>
+</div></div><h1 id="JAXRSServicesConfiguration-ServletandApplicationContainerConfiguration">Servlet and Application Container Configuration</h1><p>Please see this <a shape="rect" href="https://cwiki.apache.org/confluence/display/CXF20DOC/JAX-RS+Deployment">page</a> for more information.</p></div>
            </div>
            <!-- Content -->
          </td>



Mime
View raw message