cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From build...@apache.org
Subject svn commit: r842801 - in /websites/production/cxf/content: cache/docs.pageCache docs/jaxrs-services-configuration.html
Date Mon, 17 Dec 2012 12:48:34 GMT
Author: buildbot
Date: Mon Dec 17 12:48:34 2012
New Revision: 842801

Log:
Production update by buildbot for cxf

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

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

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 Mon Dec 17 12:48:34
2012
@@ -970,7 +970,45 @@ Since CXF 2.2.3 one can put them directl
 
 <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 at the moment it is only possible to register the providers bound to a specific
bus implementing "javax.ws.rs.ext.ExceptionMapper", "javax.ws.rs.ext.MessageBodyReader" or
"javax.ws.rs.ext.MessageBodyWriter" interfaces. Registering all supported JAX-RS and CXF-specific
providers on the specific bus will also be possible soon.  </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" style="border-width: 1px;"><div class="codeContent panelContent">
+<pre class="code-xml">
+<span class="code-tag">&lt;beans <span class="code-keyword">xmlns:util</span>=<span
class="code-quote">"http://www.springframework.org/schema/util"</span>&gt;</span>
+  
+  <span class="code-tag">&lt;cxf:bus&gt;</span>
+        <span class="code-tag">&lt;cxf:properties&gt;</span>
+            <span class="code-tag">&lt;entry key=<span class="code-quote">"org.apache.cxf.jaxrs.bus.providers"</span>
ref=<span class="code-quote">"busProviders"</span>/&gt;</span>
+        <span class="code-tag">&lt;/cxf:properties&gt;</span>
+  &lt;/cxf:bus
+
+  <span class="code-tag">&lt;util:list id=<span class="code-quote">"busProviders"</span>&gt;</span>
+    <span class="code-tag">&lt;ref bean=<span class="code-quote">"exceptionMapper"</span>/&gt;</span>
+    <span class="code-tag">&lt;ref bean=<span class="code-quote">"customMessageBodyReader"</span>/&gt;</span>
+    <span class="code-tag">&lt;ref bean=<span class="code-quote">"customMessageBodyWriter"</span>/&gt;</span>
+  <span class="code-tag">&lt;/util:list&gt;</span>
+
+  <span class="code-tag">&lt;bean id=<span class="code-quote">"exceptionMapper"</span>
class=<span class="code-quote">"org.apache.cxf.systest.jaxrs.RuntimeExceptionMapper"</span>/&gt;</span>
+  <span class="code-tag">&lt;bean id=<span class="code-quote">"customMessageBodyReader"</span>
class=<span class="code-quote">"org.apache.cxf.systest.jaxrs.CustomReader"</span>/&gt;</span>
+  <span class="code-tag">&lt;bean id=<span class="code-quote">"customMessageBodyWriter"</span>
class=<span class="code-quote">"org.apache.cxf.systest.jaxrs.CustomWriter"</span>/&gt;</span>

+
+  <span class="code-tag">&lt;jaxrs:server id=<span class="code-quote">"customerService"</span>
address=<span class="code-quote">"/service1"</span>&gt;</span>
+    <span class="code-tag">&lt;jaxrs:serviceBeans&gt;</span>
+      <span class="code-tag">&lt;bean class=<span class="code-quote">"org.apache.cxf.systest.jaxrs.CustomerService"</span>/&gt;</span>
+    <span class="code-tag">&lt;/jaxrs:serviceBeans&gt;</span>
+  <span class="code-tag">&lt;/jaxrs:server&gt;</span>
+
+  <span class="code-tag">&lt;jaxrs:server id=<span class="code-quote">"customerService"</span>
address=<span class="code-quote">"/service2"</span>&gt;</span>
+    <span class="code-tag">&lt;jaxrs:serviceBeans&gt;</span>
+      <span class="code-tag">&lt;bean class=<span class="code-quote">"org.apache.cxf.systest.jaxrs.CustomerService2"</span>/&gt;</span>
+    <span class="code-tag">&lt;/jaxrs:serviceBeans&gt;</span>
+  <span class="code-tag">&lt;/jaxrs:server&gt;</span>
+  
+  <span class="code-tag">&lt;/beans&gt;</span>
+</pre>
+</div></div>
 
 <h1><a shape="rect" name="JAXRSServicesConfiguration-DynamicservletsandasingleJAXRSendpoint"></a>Dynamic
servlets and a single JAX-RS endpoint</h1>
 



Mime
View raw message