cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r867253 [21/46] - in /websites/production/cxf/content: ./ 2008/04/28/ 2008/06/20/ 2009/02/10/ 2009/08/04/ cache/ docs/ docs/cxf-architecture.thumbs/ docs/cxf-dependency-graphs.thumbs/ docs/logbrowser-configuration.thumbs/ docs/logbrowser-so...
Date Mon, 24 Jun 2013 17:10:57 GMT
Modified: websites/production/cxf/content/docs/jax-rs-data-bindings.html
==============================================================================
--- websites/production/cxf/content/docs/jax-rs-data-bindings.html (original)
+++ websites/production/cxf/content/docs/jax-rs-data-bindings.html Mon Jun 24 17:10:51 2013
@@ -25,6 +25,18 @@
 <meta http-equiv="Content-type" content="text/html;charset=UTF-8">
 <meta name="keywords" content="business integration, EAI, SOA, Service Oriented Architecture, web services, SOAP, JBI, JMS, WSDL, XML, EDI, Electronic Data Interchange, standards support, integration standards, application integration, middleware, software, solutions, services, CXF, open source">
 <meta name="description" content="Apache CXF, Services Framework - JAX-RS Data Bindings">
+
+  <link href='http://cxf.apache.org/resources/highlighter/styles/shCore.css' rel='stylesheet' type='text/css' />
+  <link href='http://cxf.apache.org/resources/highlighter/styles/shThemeCXF.css' rel='stylesheet' type='text/css' />
+  <script src='http://cxf.apache.org/resources/highlighter/scripts/shCore.js' type='text/javascript'></script>
+  <script src='http://cxf.apache.org/resources/highlighter/scripts/shBrushJava.js' type='text/javascript'></script>
+  <script src='http://cxf.apache.org/resources/highlighter/scripts/shBrushXml.js' type='text/javascript'></script>
+  
+  <script type="text/javascript">
+  SyntaxHighlighter.defaults['toolbar'] = false;
+  SyntaxHighlighter.all();
+  </script>
+ 
     <title>
 Apache CXF -- JAX-RS Data Bindings
     </title>
@@ -42,19 +54,15 @@ Apache CXF -- JAX-RS Data Bindings
     <td id="cell-1-0">&nbsp;</td>
     <td id="cell-1-1">&nbsp;</td>
     <td id="cell-1-2">
-      <div style="padding: 5px;">
-        <div id="banner">
-          <!-- Banner -->
-<div id="banner-content">
+      <!-- Banner -->
+<div class="banner" id="banner"><p>
 <table border="0" cellpadding="0" cellspacing="0" width="100%"><tr><td align="left" colspan="1" nowrap>
 <a shape="rect" href="http://cxf.apache.org/" title="Apache CXF"><span style="font-weight: bold; font-size: 170%; color: white">Apache CXF</span></a>
 </td><td align="right" colspan="1" nowrap>
 <a shape="rect" href="http://www.apache.org/" title="The Apache Sofware Foundation"><img border="0" alt="ASF Logo" src="http://cxf.apache.org/images/asf-logo.png"></a>
 </td></tr></table>
-</div>
-          <!-- Banner -->
-        </div>
-      </div>
+</p></div>
+      <!-- Banner -->
       <div id="top-menu">
         <table border="0" cellpadding="1" cellspacing="0" width="100%">
           <tr>
@@ -94,7 +102,7 @@ Apache CXF -- JAX-RS Data Bindings
 
 
 <hr>
-<ul class="alternate" type="square"><li>Search
+<ul class="alternate" type="square"><li>Search<br clear="none">
 
 <form enctype="application/x-www-form-urlencoded" method="get" id="cse-search-box" action="http://www.google.com/cse">
   <div>
@@ -135,81 +143,81 @@ Apache CXF -- JAX-RS Data Bindings
 
 <p>For example:</p>
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-java">
-@XmlRootElement(name = <span class="code-quote">"Customer"</span>)
-<span class="code-keyword">public</span> class Customer {
-    <span class="code-keyword">private</span> <span class="code-object">String</span> name;
-    <span class="code-keyword">private</span> <span class="code-object">long</span> id;
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
+@XmlRootElement(name = "Customer")
+public class Customer {
+    private String name;
+    private long id;
 
-    <span class="code-keyword">public</span> Customer() {
+    public Customer() {
     }
 
-    <span class="code-keyword">public</span> void setName(<span class="code-object">String</span> n) {
+    public void setName(String n) {
         name = n;
     }
 
-    <span class="code-keyword">public</span> <span class="code-object">String</span> getName() {
-        <span class="code-keyword">return</span> name;
+    public String getName() {
+        return name;
     }
 
-    <span class="code-keyword">public</span> void setId(<span class="code-object">long</span> i) {
+    public void setId(long i) {
         id = i;
     }
 
-    <span class="code-keyword">public</span> <span class="code-object">long</span> getId() {
-        <span class="code-keyword">return</span> id;
+    public long getId() {
+        return id;
     }
 }
-</pre>
+]]></script>
 </div></div>
 <p>In the example below, the Customer object returned by getCustomer is marshaled using JAXB data binding:</p>
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-java">
-@Path(<span class="code-quote">"/customerservice/"</span>)
-<span class="code-keyword">public</span> class CustomerService {
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
+@Path("/customerservice/")
+public class CustomerService {
     @GET
-    @Path(<span class="code-quote">"/customers/{customerId}/"</span>)
-    <span class="code-keyword">public</span> Customer getCustomer(@PathParam(<span class="code-quote">"customerId"</span>) <span class="code-object">String</span> id) {
+    @Path("/customers/{customerId}/")
+    public Customer getCustomer(@PathParam("customerId") String id) {
         ....
     }
 }
-</pre>
+]]></script>
 </div></div>
 <p>The wire representation of Customer object is:</p>
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-xml">
-<span class="code-tag">&lt;Customer&gt;</span>
-    <span class="code-tag">&lt;id&gt;</span>123<span class="code-tag">&lt;/id&gt;</span>
-    <span class="code-tag">&lt;name&gt;</span>John<span class="code-tag">&lt;/name&gt;</span>
-<span class="code-tag">&lt;/Customer&gt;</span>
-</pre>
+<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[
+&lt;Customer&gt;
+    &lt;id&gt;123&lt;/id&gt;
+    &lt;name&gt;John&lt;/name&gt;
+&lt;/Customer&gt;
+]]></script>
 </div></div>
 
 <p>The simplest way to work with the collections is to define a type representing a collection. For example:</p>
 
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-java">
-@XmlRootElement(name = <span class="code-quote">"Customers"</span>)
-<span class="code-keyword">public</span> class Customers {
-    <span class="code-keyword">private</span> Collection&lt;Customer&gt; customers;
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
+@XmlRootElement(name = "Customers")
+public class Customers {
+    private Collection&lt;Customer&gt; customers;
 
-    <span class="code-keyword">public</span> Collection&lt;Customer&gt; getCustomer() {
-        <span class="code-keyword">return</span> customers;
+    public Collection&lt;Customer&gt; getCustomer() {
+        return customers;
     }
 
-    <span class="code-keyword">public</span> void setCustomer(Collection&lt;Customer&gt; c) {
-        <span class="code-keyword">this</span>.customers = c;
+    public void setCustomer(Collection&lt;Customer&gt; c) {
+        this.customers = c;
     }
 }
-@Path(<span class="code-quote">"/customerservice/"</span>)
-<span class="code-keyword">public</span> class CustomerService {
+@Path("/customerservice/")
+public class CustomerService {
     @GET
-    @Path(<span class="code-quote">"/customers/"</span>)
-    <span class="code-keyword">public</span> Customers getCustomers() {
+    @Path("/customers/")
+    public Customers getCustomers() {
         ....
     }
 }
-</pre>
+]]></script>
 </div></div>
 
 <p>Alternatively to using @XmlRootElement and Collection wrappers, one can provide an Object factory which will tell JAXB how to marshal a given type (in case of Collections - its template type). Another option is to return/accept a JAXBElement directly from/in a given method.</p>
@@ -223,18 +231,18 @@ Apache CXF -- JAX-RS Data Bindings
 <p>The default JAXB provider can be configured in a number of ways. For example, here's how to set up marshall properties :</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;bean id=<span class="code-quote">"jaxbProvider"</span> class=<span class="code-quote">"org.apache.cxf.jaxrs.provider.JAXBElementProvider"</span>&gt;</span>
-<span class="code-tag">&lt;property name=<span class="code-quote">"marshallerProperties"</span> ref=<span class="code-quote">"propertiesMap"</span>/&gt;</span>
-<span class="code-tag">&lt;/bean&gt;</span>
-<span class="code-tag">&lt;util:map id=<span class="code-quote">"propertiesMap"</span>&gt;</span>
-<span class="code-tag">&lt;entry key=<span class="code-quote">"jaxb.formatted.output"</span>&gt;</span>
-   <span class="code-tag">&lt;value type=<span class="code-quote">"java.lang.Boolean"</span>&gt;</span>true<span class="code-tag">&lt;/value&gt;</span>
-<span class="code-tag">&lt;/entry&gt;</span>
-<span class="code-tag">&lt;/util:map&gt;</span>
-/<span class="code-tag">&lt;beans&gt;</span>
-</pre>
+<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[
+&lt;beans xmlns:util="http://www.springframework.org/schema/util"&gt;
+&lt;bean id="jaxbProvider" class="org.apache.cxf.jaxrs.provider.JAXBElementProvider"&gt;
+&lt;property name="marshallerProperties" ref="propertiesMap"/&gt;
+&lt;/bean&gt;
+&lt;util:map id="propertiesMap"&gt;
+&lt;entry key="jaxb.formatted.output"&gt;
+   &lt;value type="java.lang.Boolean"&gt;true&lt;/value&gt;
+&lt;/entry&gt;
+&lt;/util:map&gt;
+/&lt;beans&gt;
+]]></script>
 </div></div>
 
 <p>Individual marshal properties can be injected as simple properties. At the moment, Marshaller.JAXB_SCHEMA_LOCATION can be injected as "schemaLocation" property. Schema validation can be enabled and custom @Consume and @Produce media types can be injected, see <a shape="rect" class="external-link" href="http://svn.apache.org/repos/asf/cxf/trunk/systests/jaxrs/src/test/resources/jaxrs/WEB-INF/beans.xml">this example</a> and "Customizing media types for message body providers" and "Schema Validation" sections for more information. </p>
@@ -260,16 +268,16 @@ If Moxy is used to handle beans without 
 
 <p>Following code returns a Customer object that is marshaled to JSON format:</p>
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-java">
-@Path(<span class="code-quote">"/customerservice/"</span>)
-<span class="code-keyword">public</span> class CustomerService {
-    @Produces(<span class="code-quote">"application/json"</span>)
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
+@Path("/customerservice/")
+public class CustomerService {
+    @Produces("application/json")
     @GET
-    @Path(<span class="code-quote">"/customers/{customerId}/"</span>)
-    <span class="code-keyword">public</span> Customer getCustomer(@PathParam(<span class="code-quote">"customerId"</span>) <span class="code-object">String</span> id) {
+    @Path("/customers/{customerId}/")
+    public Customer getCustomer(@PathParam("customerId") String id) {
         ....
     }
-</pre>
+]]></script>
 </div></div>
 
 <h2><a shape="rect" name="JAX-RSDataBindings-Jettison"></a>Jettison</h2>
@@ -281,16 +289,16 @@ If Moxy is used to handle beans without 
 <p>The default JSON provider can be configured in a number of ways. For example, here's how to set up namespace-to-prefix mappings :</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;bean id=<span class="code-quote">"jaxbProvider"</span> class=<span class="code-quote">"org.apache.cxf.jaxrs.provider.json.JSONProvider"</span>&gt;</span>
-<span class="code-tag">&lt;property name=<span class="code-quote">"namespaceMap"</span> ref=<span class="code-quote">"jsonNamespaceMap"</span>/&gt;</span>
-<span class="code-tag">&lt;/bean&gt;</span>
-<span class="code-tag">&lt;util:map id=<span class="code-quote">"jsonNamespaceMap"</span> map-class=<span class="code-quote">"java.util.Hashtable"</span>&gt;</span>
-<span class="code-tag">&lt;entry key=<span class="code-quote">"http://www.example.org/books"</span> value=<span class="code-quote">"b"</span>/&gt;</span>
-<span class="code-tag">&lt;/util:map&gt;</span>
-/<span class="code-tag">&lt;beans&gt;</span>
-</pre>
+<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[
+&lt;beans xmlns:util="http://www.springframework.org/schema/util"&gt;
+&lt;bean id="jaxbProvider" class="org.apache.cxf.jaxrs.provider.json.JSONProvider"&gt;
+&lt;property name="namespaceMap" ref="jsonNamespaceMap"/&gt;
+&lt;/bean&gt;
+&lt;util:map id="jsonNamespaceMap" map-class="java.util.Hashtable"&gt;
+&lt;entry key="http://www.example.org/books" value="b"/&gt;
+&lt;/util:map&gt;
+/&lt;beans&gt;
+]]></script>
 </div></div>
 
 <p><b>Note</b> that starting from CXF 2.3.0 it may not be needed to set up a custom namespace map on the write side with JSONProvider making a 'best' effort to retrieve them during the JAXB Marshaller calls.  Starting from CXF 2.6.1 and 2.5.4 setting the namespace maps will additionally configure a Marshaller namespace mapper.</p>
@@ -304,38 +312,38 @@ If Moxy is used to handle beans without 
 <p>Note that 'serializeAsArray' and 'arrayKeys' can be combined to produce so called natural convention sequences. For example, given the following two class definitions :</p>
 
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-java">
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
 @XmlRootElement()
-@XmlType(name = <span class="code-quote">"", propOrder = {"</span>title<span class="code-quote">", "</span>comments" })
-<span class="code-keyword">public</span> <span class="code-keyword">static</span> class Post {
-    <span class="code-keyword">private</span> <span class="code-object">String</span> title;
-    <span class="code-keyword">private</span> List&lt;Comment&gt; comments = <span class="code-keyword">new</span> ArrayList&lt;Comment&gt;();
-    <span class="code-keyword">public</span> void setTitle(<span class="code-object">String</span> title) {
-        <span class="code-keyword">this</span>.title = title;
+@XmlType(name = "", propOrder = {"title", "comments" })
+public static class Post {
+    private String title;
+    private List&lt;Comment&gt; comments = new ArrayList&lt;Comment&gt;();
+    public void setTitle(String title) {
+        this.title = title;
     }
-    <span class="code-keyword">public</span> <span class="code-object">String</span> getTitle() {
-        <span class="code-keyword">return</span> title;
+    public String getTitle() {
+        return title;
     }
-    <span class="code-keyword">public</span> void setComments(List&lt;Comment&gt; comments) {
-        <span class="code-keyword">this</span>.comments = comments;
+    public void setComments(List&lt;Comment&gt; comments) {
+        this.comments = comments;
     }
-    <span class="code-keyword">public</span> List&lt;Comment&gt; getComments() {
-        <span class="code-keyword">return</span> comments;
+    public List&lt;Comment&gt; getComments() {
+        return comments;
     }
 }
    
-<span class="code-keyword">public</span> <span class="code-keyword">static</span> class Comment {
-     <span class="code-keyword">private</span> <span class="code-object">String</span> title;
+public static class Comment {
+     private String title;
 
-     <span class="code-keyword">public</span> void setTitle(<span class="code-object">String</span> title) {
-        <span class="code-keyword">this</span>.title = title;
+     public void setTitle(String title) {
+        this.title = title;
      }
 
-     <span class="code-keyword">public</span> <span class="code-object">String</span> getTitle() {
-         <span class="code-keyword">return</span> title;
+     public String getTitle() {
+         return title;
      }
 } 
-</pre>
+]]></script>
 </div></div>
 
 <p>an instance of Post class can be serialized like this if a JSONProvider has had its 'serializeAsArray' property set to 'true' and 'arrayKeys' list property set to contain 'comments' value :</p>
@@ -366,33 +374,33 @@ If Moxy is used to handle beans without 
 
 <p>If you prefer working with Jackson JSON providers then register either JacksonJsonProvider:</p>
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-xml">
-<span class="code-tag">&lt;jaxrs:providers&gt;</span>
-   <span class="code-tag">&lt;bean class=<span class="code-quote">"org.codehaus.jackson.jaxrs.JacksonJsonProvider"</span>/&gt;</span>
-<span class="code-tag">&lt;/jaxrs:providers&gt;</span>
-</pre>
+<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[
+&lt;jaxrs:providers&gt;
+   &lt;bean class="org.codehaus.jackson.jaxrs.JacksonJsonProvider"/&gt;
+&lt;/jaxrs:providers&gt;
+]]></script>
 </div></div>
 
 <p>or JacksonJaxbJsonProvider (when working with JAXB beans):</p>
 
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-xml">
-<span class="code-tag">&lt;jaxrs:providers&gt;</span>
-   <span class="code-tag">&lt;bean class=<span class="code-quote">"org.codehaus.jackson.jaxrs.JacksonJaxbJsonProvider"</span>/&gt;</span>
-<span class="code-tag">&lt;/jaxrs:providers&gt;</span>
-</pre>
+<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[
+&lt;jaxrs:providers&gt;
+   &lt;bean class="org.codehaus.jackson.jaxrs.JacksonJaxbJsonProvider"/&gt;
+&lt;/jaxrs:providers&gt;
+]]></script>
 </div></div>
 
 
 <p>and add this Maven dependency:</p>
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-xml">
-<span class="code-tag">&lt;dependency&gt;</span>
-  <span class="code-tag">&lt;groupId&gt;</span>org.codehaus.jackson<span class="code-tag">&lt;/groupId&gt;</span>
-  <span class="code-tag">&lt;artifactId&gt;</span>jackson-jaxrs<span class="code-tag">&lt;/artifactId&gt;</span>
-  <span class="code-tag">&lt;version&gt;</span>1.9.0<span class="code-tag">&lt;/version&gt;</span>
-<span class="code-tag">&lt;/dependency&gt;</span>
-</pre>
+<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[
+&lt;dependency&gt;
+  &lt;groupId&gt;org.codehaus.jackson&lt;/groupId&gt;
+  &lt;artifactId&gt;jackson-jaxrs&lt;/artifactId&gt;
+  &lt;version&gt;1.9.0&lt;/version&gt;
+&lt;/dependency&gt;
+]]></script>
 </div></div>
 
 <h1><a shape="rect" name="JAX-RSDataBindings-CommonJAXBandJSONconfiguration"></a>Common JAXB and JSON configuration</h1>
@@ -404,17 +412,17 @@ If Moxy is used to handle beans without 
 <p>By default JAXBContexts are created on demand. Starting from CXF 2.3.2 and 2.4.0 it is possible to configure JAXB-based providers to support the creation of a single JAXBContext, example :</p>
 
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-xml">
-<span class="code-tag">&lt;bean id=<span class="code-quote">"jaxb"</span> class=<span class="code-quote">"org.apache.cxf.jaxrs.provider.JAXBElementProvider"</span>&gt;</span>
-      <span class="code-tag">&lt;property name=<span class="code-quote">"singleJaxbContext"</span> value=<span class="code-quote">"true"</span>/&gt;</span>
-      <span class="code-tag">&lt;property name=<span class="code-quote">"extraClass"</span>&gt;</span>
-         <span class="code-tag">&lt;list&gt;</span>
-           <span class="code-tag">&lt;value&gt;</span>org.apache.cxf.jaxrs.resources.SuperBook<span class="code-tag">&lt;/value&gt;</span>
-           <span class="code-tag">&lt;value&gt;</span>org.apache.cxf.jaxrs.resources.SuperBook<span class="code-tag">&lt;/value&gt;</span>  
-         <span class="code-tag">&lt;/list&gt;</span>
-      <span class="code-tag">&lt;/property&gt;</span>
-<span class="code-tag">&lt;/bean&gt;</span>
-</pre>
+<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[
+&lt;bean id="jaxb" class="org.apache.cxf.jaxrs.provider.JAXBElementProvider"&gt;
+      &lt;property name="singleJaxbContext" value="true"/&gt;
+      &lt;property name="extraClass"&gt;
+         &lt;list&gt;
+           &lt;value&gt;org.apache.cxf.jaxrs.resources.SuperBook&lt;/value&gt;
+           &lt;value&gt;org.apache.cxf.jaxrs.resources.SuperBook&lt;/value&gt;  
+         &lt;/list&gt;
+      &lt;/property&gt;
+&lt;/bean&gt;
+]]></script>
 </div></div>
 
 <p>Please note that if an extraClass property is set then the JAXBContext (single as in the above example or the one created dynamically on a per-class or per-package basis) will also include the extra user classes thus making it possible to avoid setting an XmlSeeAlso JAXB annotation or dealing with JAXB jaxb.index or ObjectFactory resources. This property is identical to a CXF JAXBDataBinding 'extraClass' property. </p>
@@ -451,20 +459,20 @@ One can override it by setting a 'collec
 
 <p>There's also a 'collectionWrapperMap' property available for use in more advanced cases, when collections of different types are used, for example, when mixed collections of objects descended from abstract classes having no @XmlRootElement tags are returned :</p>
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-xml">
-<span class="code-tag"><span class="code-comment">&lt;!-- Configure JAXB Provider --&gt;</span></span>
-&lt;bean id=<span class="code-quote">"jaxbProvider"</span>
-class=<span class="code-quote">"org.apache.cxf.jaxrs.provider.JAXBElementProvider"</span>&gt;
-  <span class="code-tag">&lt;property name=<span class="code-quote">"collectionWrapperMap"</span>&gt;</span>
-  <span class="code-tag">&lt;map&gt;</span>
-    <span class="code-tag">&lt;entry&gt;</span>
-      <span class="code-tag">&lt;key&gt;</span><span class="code-tag">&lt;value&gt;</span>com.foo.bar.MyObject<span class="code-tag">&lt;/value&gt;</span><span class="code-tag">&lt;/key&gt;</span>
-      <span class="code-tag">&lt;value&gt;</span>MyObjects<span class="code-tag">&lt;/value&gt;</span>
-    <span class="code-tag">&lt;/entry&gt;</span>
-   <span class="code-tag">&lt;/map&gt;</span>
-   <span class="code-tag">&lt;/property&gt;</span>
-<span class="code-tag">&lt;/bean&gt;</span> 
-</pre>
+<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[
+&lt;!-- Configure JAXB Provider --&gt;
+&lt;bean id="jaxbProvider"
+class="org.apache.cxf.jaxrs.provider.JAXBElementProvider"&gt;
+  &lt;property name="collectionWrapperMap"&gt;
+  &lt;map&gt;
+    &lt;entry&gt;
+      &lt;key&gt;&lt;value&gt;com.foo.bar.MyObject&lt;/value&gt;&lt;/key&gt;
+      &lt;value&gt;MyObjects&lt;/value&gt;
+    &lt;/entry&gt;
+   &lt;/map&gt;
+   &lt;/property&gt;
+&lt;/bean&gt; 
+]]></script>
 </div></div>
 
 <p>JSONProvider can only serialize explicit collections at the moment. If needed, it can be told to drop a collection element name using a boolean 'dropCollectionWrapperElementName'. For example, a 'dropCollectionWrapperElementName' and 'serializeAsArray' properties can be used to make the Dojo JSON RestStore consume the resulting JSON sequence (in CXF 2.2.5).</p>
@@ -492,25 +500,25 @@ Typically one would delegate to a super 
 
 
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-xml">
-<span class="code-tag">&lt;bean id=<span class="code-quote">"jaxbProvider"</span> class=<span class="code-quote">"org.apache.cxf.jaxrs.provider.JAXBElementProvider"</span>&gt;</span>
-  <span class="code-tag">&lt;property name=<span class="code-quote">"outTransformElements"</span>&gt;</span>
-    <span class="code-tag">&lt;map&gt;</span>
-      <span class="code-tag"><span class="code-comment">&lt;!-- change <span class="code-quote">"book"</span> to <span class="code-quote">"thebook"</span> --&gt;</span></span>
-      <span class="code-tag">&lt;entry key=<span class="code-quote">"book"</span> value=<span class="code-quote">"thebook"</span>/&gt;</span>
+<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[
+&lt;bean id="jaxbProvider" class="org.apache.cxf.jaxrs.provider.JAXBElementProvider"&gt;
+  &lt;property name="outTransformElements"&gt;
+    &lt;map&gt;
+      &lt;!-- change "book" to "thebook" --&gt;
+      &lt;entry key="book" value="thebook"/&gt;
       
-      <span class="code-tag"><span class="code-comment">&lt;!-- drop the namespace from <span class="code-quote">"book"</span> --&gt;</span></span>
-      <span class="code-tag">&lt;entry key=<span class="code-quote">"{http://books}book"</span> value=<span class="code-quote">"book"</span>/&gt;</span> 
+      &lt;!-- drop the namespace from "book" --&gt;
+      &lt;entry key="{http://books}book" value="book"/&gt; 
       
-      <span class="code-tag"><span class="code-comment">&lt;!-- qualify <span class="code-quote">"book"</span> with <span class="code-quote">"http://books"</span> --&gt;</span></span>
-      <span class="code-tag">&lt;entry key=<span class="code-quote">"book"</span> value=<span class="code-quote">"{http://books}thebook"</span>/&gt;</span> 
+      &lt;!-- qualify "book" with "http://books" --&gt;
+      &lt;entry key="book" value="{http://books}thebook"/&gt; 
       
-      <span class="code-tag"><span class="code-comment">&lt;!--  change namespace to <span class="code-quote">"http://books"</span> for all the elements with the <span class="code-quote">"http://book"</span> namespace --&gt;</span></span>
-      <span class="code-tag">&lt;entry key=<span class="code-quote">"{http://book}*"</span> value=<span class="code-quote">"{http://books}*"</span>/&gt;</span> 
-    <span class="code-tag">&lt;/map&gt;</span>
-  <span class="code-tag">&lt;/property&gt;</span>
-<span class="code-tag">&lt;/bean&gt;</span> 
-</pre>
+      &lt;!--  change namespace to "http://books" for all the elements with the "http://book" namespace --&gt;
+      &lt;entry key="{http://book}*" value="{http://books}*"/&gt; 
+    &lt;/map&gt;
+  &lt;/property&gt;
+&lt;/bean&gt; 
+]]></script>
 </div></div>
 
 <ul class="alternate" type="square"><li>"inTransformElements" map property: can be used to change the input element names and change or drop namespaces; see the "outTransfromElements" property description for an example.</li></ul>
@@ -520,25 +528,25 @@ Typically one would delegate to a super 
 
 
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-xml">
-<span class="code-tag">&lt;bean id=<span class="code-quote">"jaxbProvider"</span> class=<span class="code-quote">"org.apache.cxf.jaxrs.provider.JAXBElementProvider"</span>&gt;</span>
-  <span class="code-tag">&lt;property name=<span class="code-quote">"outAppendElements"</span>&gt;</span>
-    <span class="code-tag">&lt;map&gt;</span>
-      <span class="code-tag"><span class="code-comment">&lt;!-- append <span class="code-quote">"book"</span> before <span class="code-quote">"thebook"</span> --&gt;</span></span>
-      <span class="code-tag">&lt;entry key=<span class="code-quote">"book"</span> value=<span class="code-quote">"thebook"</span>/&gt;</span>
+<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[
+&lt;bean id="jaxbProvider" class="org.apache.cxf.jaxrs.provider.JAXBElementProvider"&gt;
+  &lt;property name="outAppendElements"&gt;
+    &lt;map&gt;
+      &lt;!-- append "book" before "thebook" --&gt;
+      &lt;entry key="book" value="thebook"/&gt;
       
-      <span class="code-tag"><span class="code-comment">&lt;!-- qualify <span class="code-quote">"book"</span> with <span class="code-quote">"http://books"</span> --&gt;</span></span>
-      <span class="code-tag">&lt;entry key=<span class="code-quote">"{http://books}book"</span> value=<span class="code-quote">"book"</span>/&gt;</span> 
+      &lt;!-- qualify "book" with "http://books" --&gt;
+      &lt;entry key="{http://books}book" value="book"/&gt; 
       
-      <span class="code-tag"><span class="code-comment">&lt;!-- drop the namespace from the <span class="code-quote">"book"</span> --&gt;</span></span>
-      <span class="code-tag">&lt;entry key=<span class="code-quote">"book"</span> value=<span class="code-quote">"{http://books}thebook"</span>/&gt;</span> 
+      &lt;!-- drop the namespace from the "book" --&gt;
+      &lt;entry key="book" value="{http://books}thebook"/&gt; 
       
-      <span class="code-tag"><span class="code-comment">&lt;!--  change namespace to <span class="code-quote">"http://book"</span> for all the elements with the <span class="code-quote">"http://books"</span> namespace --&gt;</span></span>
-      <span class="code-tag">&lt;entry key=<span class="code-quote">"{http://book}*"</span> value=<span class="code-quote">"{http://books}*"</span>/&gt;</span> 
-    <span class="code-tag">&lt;/map&gt;</span>
-  <span class="code-tag">&lt;/property&gt;</span>
-<span class="code-tag">&lt;/bean&gt;</span> 
-</pre>
+      &lt;!--  change namespace to "http://book" for all the elements with the "http://books" namespace --&gt;
+      &lt;entry key="{http://book}*" value="{http://books}*"/&gt; 
+    &lt;/map&gt;
+  &lt;/property&gt;
+&lt;/bean&gt; 
+]]></script>
 </div></div>
 
 <ul class="alternate" type="square"><li>"inAppendElements" map property : can be used to append new simple or qualified elements to the input; see the "outAppendElements" property description for an example.</li></ul>
@@ -548,17 +556,17 @@ Typically one would delegate to a super 
 
 
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-xml">
-<span class="code-tag">&lt;bean id=<span class="code-quote">"jaxbProvider"</span> class=<span class="code-quote">"org.apache.cxf.jaxrs.provider.JAXBElementProvider"</span>&gt;</span>
-  <span class="code-tag">&lt;property name=<span class="code-quote">"outDropElements"</span>&gt;</span>
-    <span class="code-tag">&lt;list&gt;</span>
-      <span class="code-tag"><span class="code-comment">&lt;!-- ignore drop and {http://numbers}number elements --&gt;</span></span>
-      <span class="code-tag">&lt;value&gt;</span>{http://numbers}number<span class="code-tag">&lt;/value&gt;</span>
-      <span class="code-tag">&lt;value&gt;</span>index<span class="code-tag">&lt;/value&gt;</span>
-    <span class="code-tag">&lt;/list&gt;</span>
-  <span class="code-tag">&lt;/property&gt;</span>
-<span class="code-tag">&lt;/bean&gt;</span> 
-</pre>
+<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[
+&lt;bean id="jaxbProvider" class="org.apache.cxf.jaxrs.provider.JAXBElementProvider"&gt;
+  &lt;property name="outDropElements"&gt;
+    &lt;list&gt;
+      &lt;!-- ignore drop and {http://numbers}number elements --&gt;
+      &lt;value&gt;{http://numbers}number&lt;/value&gt;
+      &lt;value&gt;index&lt;/value&gt;
+    &lt;/list&gt;
+  &lt;/property&gt;
+&lt;/bean&gt; 
+]]></script>
 </div></div>
 
 <ul class="alternate" type="square"><li>"inDropElements" list property : can be used to drop elements during the deserialization; note that children elements if any of a given dropped element are not affected. Please see the "outDropElements" property description for an example.</li></ul>
@@ -578,68 +586,68 @@ Typically one would delegate to a super 
 <p>Additionally it is possible to configure JAXBElementProvider or JSONProvider with contextual properties or <a shape="rect" class="external-link" href="http://svn.apache.org/repos/asf/cxf/trunk/api/src/main/java/org/apache/cxf/staxutils/DocumentDepthProperties.java">DocumentDepthProperties</a>:</p>
 
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-xml">
+<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[
 
-<span class="code-tag">&lt;bean id=<span class="code-quote">"depthProperties"</span> class=<span class="code-quote">"org.apache.cxf.staxutils.DocumentDepthProperties"</span>&gt;</span>
-  <span class="code-tag">&lt;property name=<span class="code-quote">"innerElementCountThreshold"</span> value=<span class="code-quote">"500"</span>/&gt;</span>
-<span class="code-tag">&lt;/bean&gt;</span> 
-
-<span class="code-tag">&lt;bean id=<span class="code-quote">"jaxbProvider"</span> class=<span class="code-quote">"org.apache.cxf.jaxrs.provider.JAXBElementProvider"</span>&gt;</span>
-  <span class="code-tag">&lt;property name=<span class="code-quote">"depthProperties"</span> ref=<span class="code-quote">"depthProperties"</span>/&gt;</span>
-<span class="code-tag">&lt;/bean&gt;</span> 
-
-<span class="code-tag">&lt;bean id=<span class="code-quote">"jsonProvider"</span> class=<span class="code-quote">"org.apache.cxf.jaxrs.provider.json.JSONProvider"</span>&gt;</span>
-  <span class="code-tag">&lt;property name=<span class="code-quote">"depthProperties"</span> ref=<span class="code-quote">"depthProperties"</span>/&gt;</span>
-<span class="code-tag">&lt;/bean&gt;</span> 
-
-<span class="code-tag">&lt;jaxrs:server id=<span class="code-quote">"endpoint1"</span>&gt;</span>
-  <span class="code-tag">&lt;jaxrs:serviceBeans&gt;</span>
-    <span class="code-tag">&lt;bean class=<span class="code-quote">"my.package.RootResource"</span>/&gt;</span>
-  <span class="code-tag">&lt;/jaxrs:serviceBeans&gt;</span>
-  <span class="code-tag">&lt;jaxrs:providers&gt;</span>
-    <span class="code-tag">&lt;ref bean=<span class="code-quote">"jaxbProvider"</span>/&gt;</span>
-    <span class="code-tag">&lt;ref bean=<span class="code-quote">"jsonProvider"</span>/&gt;</span>
-  <span class="code-tag">&lt;/jaxrs:providers&gt;</span>
-<span class="code-tag">&lt;/jaxrs:server&gt;</span>
-
-<span class="code-tag">&lt;jaxrs:server id=<span class="code-quote">"endpoint2"</span>&gt;</span>
-  <span class="code-tag">&lt;jaxrs:serviceBeans&gt;</span>
-    <span class="code-tag">&lt;bean class=<span class="code-quote">"my.package.RootResource"</span>/&gt;</span>
-  <span class="code-tag">&lt;/jaxrs:serviceBeans&gt;</span>
-  <span class="code-tag">&lt;jaxrs:properties&gt;</span>
-    &lt;entry key=<span class="code-quote">"depthInnerElementCountThreshold"</span> value=<span class="code-quote">"500"</span>/
-  <span class="code-tag">&lt;/jaxrs:properties&gt;</span>
-<span class="code-tag">&lt;/jaxrs:server&gt;</span>
+&lt;bean id="depthProperties" class="org.apache.cxf.staxutils.DocumentDepthProperties"&gt;
+  &lt;property name="innerElementCountThreshold" value="500"/&gt;
+&lt;/bean&gt; 
+
+&lt;bean id="jaxbProvider" class="org.apache.cxf.jaxrs.provider.JAXBElementProvider"&gt;
+  &lt;property name="depthProperties" ref="depthProperties"/&gt;
+&lt;/bean&gt; 
+
+&lt;bean id="jsonProvider" class="org.apache.cxf.jaxrs.provider.json.JSONProvider"&gt;
+  &lt;property name="depthProperties" ref="depthProperties"/&gt;
+&lt;/bean&gt; 
+
+&lt;jaxrs:server id="endpoint1"&gt;
+  &lt;jaxrs:serviceBeans&gt;
+    &lt;bean class="my.package.RootResource"/&gt;
+  &lt;/jaxrs:serviceBeans&gt;
+  &lt;jaxrs:providers&gt;
+    &lt;ref bean="jaxbProvider"/&gt;
+    &lt;ref bean="jsonProvider"/&gt;
+  &lt;/jaxrs:providers&gt;
+&lt;/jaxrs:server&gt;
+
+&lt;jaxrs:server id="endpoint2"&gt;
+  &lt;jaxrs:serviceBeans&gt;
+    &lt;bean class="my.package.RootResource"/&gt;
+  &lt;/jaxrs:serviceBeans&gt;
+  &lt;jaxrs:properties&gt;
+    &lt;entry key="depthInnerElementCountThreshold" value="500"/
+  &lt;/jaxrs:properties&gt;
+&lt;/jaxrs:server&gt;
 
 
-</pre>
+]]></script>
 </div></div>
 
 <h1><a shape="rect" name="JAX-RSDataBindings-JSONWithPadding%28JSONP%29"></a>JSON With Padding (JSONP)</h1>
 
 <p>One option for supporting "JSON With Padding" (<a shape="rect" class="external-link" href="http://en.wikipedia.org/wiki/JSONP" rel="nofollow">JSONP</a>) is to extend the default JSONProvider and override its writeTo method as follows:</p>
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-java">
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
 
-@Produces(<span class="code-quote">"application/javascript"</span>)
-class JsonpProvider <span class="code-keyword">extends</span> JSONProvider {
+@Produces("application/javascript")
+class JsonpProvider extends JSONProvider {
 		
     @Override
-    <span class="code-keyword">public</span> void writeTo(<span class="code-object">Object</span> obj, <span class="code-object">Class</span>&lt;?&gt; cls, Type genericType, Annotation[] anns, MediaType m, MultivaluedMap&lt;<span class="code-object">String</span>, <span class="code-object">Object</span>&gt; headers,
-	OutputStream os) <span class="code-keyword">throws</span> IOException {
-	<span class="code-object">String</span> prefix = getContext().getHttpServletRequest().getParameter(<span class="code-quote">"_jsonp"</span>);
-	<span class="code-object">boolean</span> hasPrefix = !isEmpty(prefix);
-	<span class="code-keyword">if</span>(hasPrefix) {
-	    os.write(prefix.getBytes(HttpUtils.getSetEncoding(m, headers, <span class="code-quote">"UTF-8"</span>)));
+    public void writeTo(Object obj, Class&lt;?&gt; cls, Type genericType, Annotation[] anns, MediaType m, MultivaluedMap&lt;String, Object&gt; headers,
+	OutputStream os) throws IOException {
+	String prefix = getContext().getHttpServletRequest().getParameter("_jsonp");
+	boolean hasPrefix = !isEmpty(prefix);
+	if(hasPrefix) {
+	    os.write(prefix.getBytes(HttpUtils.getSetEncoding(m, headers, "UTF-8")));
 	    os.write('(');
 	}
-	<span class="code-keyword">super</span>.writeTo(obj, cls, genericType, anns, m, headers, os);
-	<span class="code-keyword">if</span>(hasPrefix) {
+	super.writeTo(obj, cls, genericType, anns, m, headers, os);
+	if(hasPrefix) {
 		os.write(')');
 	}
     }
 }
-</pre>
+]]></script>
 </div></div> 
 
 <p>Similar approach can work when Jackson is used.</p>
@@ -649,48 +657,48 @@ class JsonpProvider <span class="code-ke
 <p>Starting from CXF 2.3.4 and 2.4.0, JSONP can be supported with the help of CXF in/out interceptors:</p>
 
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-xml">
-<span class="code-tag">&lt;jaxrs:server id=<span class="code-quote">"bookJsonp"</span> address=<span class="code-quote">"/jsonp"</span>&gt;</span>
-    <span class="code-tag">&lt;jaxrs:serviceBeans&gt;</span>
-      <span class="code-tag">&lt;ref bean=<span class="code-quote">"serviceBean"</span> /&gt;</span>
-    <span class="code-tag">&lt;/jaxrs:serviceBeans&gt;</span>		  
-
-    <span class="code-tag">&lt;jaxrs:inInterceptors&gt;</span>
-       <span class="code-tag">&lt;bean class=<span class="code-quote">"org.apache.cxf.jaxrs.provider.jsonp.JsonpInInterceptor"</span>/&gt;</span>
-    <span class="code-tag">&lt;/jaxrs:inInterceptors&gt;</span>
-    <span class="code-tag">&lt;jaxrs:outInterceptors&gt;</span>
-       <span class="code-tag">&lt;bean class=<span class="code-quote">"org.apache.cxf.jaxrs.provider.jsonp.JsonpPreStreamInterceptor"</span>/&gt;</span>
-       <span class="code-tag">&lt;bean class=<span class="code-quote">"org.apache.cxf.jaxrs.provider.jsonp.JsonpPostStreamInterceptor"</span>/&gt;</span>
-    <span class="code-tag">&lt;/jaxrs:outInterceptors&gt;</span> 
-<span class="code-tag">&lt;/jaxrs:server&gt;</span>
-</pre>
+<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[
+&lt;jaxrs:server id="bookJsonp" address="/jsonp"&gt;
+    &lt;jaxrs:serviceBeans&gt;
+      &lt;ref bean="serviceBean" /&gt;
+    &lt;/jaxrs:serviceBeans&gt;		  
+
+    &lt;jaxrs:inInterceptors&gt;
+       &lt;bean class="org.apache.cxf.jaxrs.provider.jsonp.JsonpInInterceptor"/&gt;
+    &lt;/jaxrs:inInterceptors&gt;
+    &lt;jaxrs:outInterceptors&gt;
+       &lt;bean class="org.apache.cxf.jaxrs.provider.jsonp.JsonpPreStreamInterceptor"/&gt;
+       &lt;bean class="org.apache.cxf.jaxrs.provider.jsonp.JsonpPostStreamInterceptor"/&gt;
+    &lt;/jaxrs:outInterceptors&gt; 
+&lt;/jaxrs:server&gt;
+]]></script>
 </div></div>
 
 <p>JsonpInInterceptor checks if a JSONP callback query parameter is available (default is _jsonp) and if yes then it saves its value on the current exchange for out interceptors to know if they have to write the paddings or not. The name of the expected callback parameter can be customized. JsonpPreStreamInterceptor and JsonpPostStreamInterceptor ensure the actual JSON stream is 'padded' properly. JsonpPreStreamInterceptor will also set Content-Type to "application/x+javascript" by default but this can be changed:</p>
 
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-xml">
-<span class="code-tag">&lt;jaxrs:server id=<span class="code-quote">"bookJsonp"</span> address=<span class="code-quote">"/jsonp"</span>&gt;</span>
-    <span class="code-tag">&lt;jaxrs:serviceBeans&gt;</span>
-      <span class="code-tag">&lt;ref bean=<span class="code-quote">"serviceBean"</span> /&gt;</span>
-    <span class="code-tag">&lt;/jaxrs:serviceBeans&gt;</span>		  
-
-    <span class="code-tag">&lt;jaxrs:inInterceptors&gt;</span>
-       <span class="code-tag">&lt;bean class=<span class="code-quote">"org.apache.cxf.jaxrs.provider.jsonp.JsonpInInterceptor"</span>&gt;</span>
-          <span class="code-tag">&lt;property name=<span class="code-quote">"callbackParam"</span> value=<span class="code-quote">"myjsonp"</span>/&gt;</span>
-       <span class="code-tag">&lt;/bean&gt;</span> 
-    <span class="code-tag">&lt;/jaxrs:inInterceptors&gt;</span>
-    <span class="code-tag">&lt;jaxrs:outInterceptors&gt;</span>
-       <span class="code-tag">&lt;bean class=<span class="code-quote">"org.apache.cxf.jaxrs.provider.jsonp.JsonpPreStreamInterceptor"</span>&gt;</span>
-           <span class="code-tag">&lt;property name=<span class="code-quote">"mediaType"</span> value=<span class="code-quote">"text/x+javascript"</span>/&gt;</span>
-       <span class="code-tag">&lt;/bean&gt;</span>
-       <span class="code-tag">&lt;bean class=<span class="code-quote">"org.apache.cxf.jaxrs.provider.jsonp.JsonpPostStreamInterceptor"</span>&gt;</span>
-           <span class="code-tag"><span class="code-comment">&lt;!-- default is ');' --&gt;</span></span>
-           <span class="code-tag">&lt;property name=<span class="code-quote">"paddingEnd"</span> value=<span class="code-quote">")"</span>/&gt;</span>
-       <span class="code-tag">&lt;/bean&gt;</span>
-    <span class="code-tag">&lt;/jaxrs:outInterceptors&gt;</span> 
-<span class="code-tag">&lt;/jaxrs:server&gt;</span>
-</pre>
+<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[
+&lt;jaxrs:server id="bookJsonp" address="/jsonp"&gt;
+    &lt;jaxrs:serviceBeans&gt;
+      &lt;ref bean="serviceBean" /&gt;
+    &lt;/jaxrs:serviceBeans&gt;		  
+
+    &lt;jaxrs:inInterceptors&gt;
+       &lt;bean class="org.apache.cxf.jaxrs.provider.jsonp.JsonpInInterceptor"&gt;
+          &lt;property name="callbackParam" value="myjsonp"/&gt;
+       &lt;/bean&gt; 
+    &lt;/jaxrs:inInterceptors&gt;
+    &lt;jaxrs:outInterceptors&gt;
+       &lt;bean class="org.apache.cxf.jaxrs.provider.jsonp.JsonpPreStreamInterceptor"&gt;
+           &lt;property name="mediaType" value="text/x+javascript"/&gt;
+       &lt;/bean&gt;
+       &lt;bean class="org.apache.cxf.jaxrs.provider.jsonp.JsonpPostStreamInterceptor"&gt;
+           &lt;!-- default is ');' --&gt;
+           &lt;property name="paddingEnd" value=")"/&gt;
+       &lt;/bean&gt;
+    &lt;/jaxrs:outInterceptors&gt; 
+&lt;/jaxrs:server&gt;
+]]></script>
 </div></div>
 
 <h1><a shape="rect" name="JAX-RSDataBindings-Formpayloads"></a>Form payloads</h1>
@@ -699,30 +707,30 @@ class JsonpProvider <span class="code-ke
 One can capture the form data by using either JAX-RS FormParam annotation or MultivaluedMap, for example:</p>
 
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-java">
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
 
-<span class="code-keyword">import</span> javax.ws.rs.FormParam;
-<span class="code-keyword">import</span> javax.ws.rs.MultivaluedMap;
+import javax.ws.rs.FormParam;
+import javax.ws.rs.MultivaluedMap;
 
-@Path(<span class="code-quote">"resource"</span>)
-<span class="code-keyword">public</span> class FormResource {
+@Path("resource")
+public class FormResource {
 
    @POST
-   @Path(<span class="code-quote">"/form1"</span>)
-   @Consumes(<span class="code-quote">"application/x-www-form-urlencoded"</span>)
-   <span class="code-keyword">public</span> void form1(@FormParam(<span class="code-quote">"name"</span>) <span class="code-object">String</span> name, @FormParam(<span class="code-quote">"age"</span>) <span class="code-object">int</span> age) {
+   @Path("/form1")
+   @Consumes("application/x-www-form-urlencoded")
+   public void form1(@FormParam("name") String name, @FormParam("age") int age) {
    }
 
    @POST
-   @Path(<span class="code-quote">"/form2"</span>)
-   @Consumes(<span class="code-quote">"application/x-www-form-urlencoded"</span>)
-   <span class="code-keyword">public</span> void form1(MultivaluedMap&lt;<span class="code-object">String</span>, <span class="code-object">String</span>&gt; params) {
-       <span class="code-object">String</span> name = params.getFirst(<span class="code-quote">"name"</span>);
-       <span class="code-object">String</span> age = params.getFirst(<span class="code-quote">"age"</span>);
+   @Path("/form2")
+   @Consumes("application/x-www-form-urlencoded")
+   public void form1(MultivaluedMap&lt;String, String&gt; params) {
+       String name = params.getFirst("name");
+       String age = params.getFirst("age");
    }
 
 }
-</pre>
+]]></script>
 </div></div>
 
 <p>Note that it is possible to control the maximum number of the expected form parameters by setting a "maxFormParameterCount" contextual property (set within the jaxrs:properties). The client will receive HTTP 413 if the limit is reached.</p>
@@ -744,27 +752,27 @@ One can capture the form data by using e
 <p>AtomPojoProvider offers users a way to have no Abdera Feed/Entry classes referenced from the 'main' application code, example :</p>
 
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-java">
-@Path(<span class="code-quote">"books"</span>)
-<span class="code-keyword">public</span> class BooksRootResource {
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
+@Path("books")
+public class BooksRootResource {
 
- <span class="code-keyword">private</span> Books books;
+ private Books books;
 
  @GET
- @Produces({<span class="code-quote">"application/xml"</span>, <span class="code-quote">"application/json"</span>, <span class="code-quote">"application/atom+xml;type=feed"</span>})
- <span class="code-keyword">public</span> Books getCollectionOfBooks() {
-     <span class="code-keyword">return</span> books;
+ @Produces({"application/xml", "application/json", "application/atom+xml;type=feed"})
+ public Books getCollectionOfBooks() {
+     return books;
  } 
 
  @GET
- @Produces({<span class="code-quote">"application/xml"</span>, <span class="code-quote">"application/json"</span>, <span class="code-quote">"application/atom+xml;type=entry"</span>})
- @Path(<span class="code-quote">"{id}"</span>)
- <span class="code-keyword">public</span> Book getBook(@PathParam(<span class="code-quote">"id"</span>) <span class="code-object">Long</span> id) {
-     <span class="code-keyword">return</span> books.get(id);
+ @Produces({"application/xml", "application/json", "application/atom+xml;type=entry"})
+ @Path("{id}")
+ public Book getBook(@PathParam("id") Long id) {
+     return books.get(id);
  }
 
 }
-</pre>
+]]></script>
 </div></div> 
 
 <p>Note that when an object such as Books is about to be converted to/read from Feed (which in our case is essentially a collection of entries each of them representing an individual Book) the AtomPojoProvider needs to know about the collection getters and/or setters so that it can create individual Entries. The "collectionGetters" and "collectionSetters" map properties with keys being the names of collection classes and values being the method names need to be used for providing this information, example a pair "org.apache.cxf.systest.jaxrs.Books:getBooks" tells AtomPojoProvider that when creating a Books Feed, the objects representing individual entries can be retrieved from Book with the help of "getBooks". If these properties are not set then AtomPojoProvider will try to get a method adding the simple class name to either 'get' or 'set', for example, an "org.apache.cxf.systest.jaxrs.Books:getBooks" pair is redundant if the Books class has a getBooks method.</p>
@@ -803,36 +811,36 @@ Please see <a shape="rect" class="extern
 <p>org.apache.cxf.jaxrs.provider.JAXRSDataBinding is a CXF DataBinding implementation which wraps JAX-RS providers and can be used by CXF JAX-WS endpoints thus making it possible to use JAX-RS providers for reading and writing XML payloads during SOAP and RESTful invocations. Example :</p>
 
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-xml">
-  <span class="code-tag">&lt;jaxrs:server id=<span class="code-quote">"hello_rest"</span> address=<span class="code-quote">"/hello-rest"</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.jaxws.HelloWorldImpl"</span>/&gt;</span>
-    <span class="code-tag">&lt;/jaxrs:serviceBeans&gt;</span>
-
-    <span class="code-tag">&lt;jaxrs:providers&gt;</span>
-      <span class="code-tag">&lt;ref bean=<span class="code-quote">"jaxbProviderSoap"</span>/&gt;</span>
-    <span class="code-tag">&lt;/jaxrs:providers&gt;</span>
-  <span class="code-tag">&lt;/jaxrs:server&gt;</span>
-
-  &lt;jaxws:endpoint <span class="code-keyword">xmlns:s</span>=<span class="code-quote">"http://hello.com"</span>
-      serviceName=<span class="code-quote">"s:HelloWorld"</span>
-      endpointName=<span class="code-quote">"s:HelloWorldPort"</span>
-      id=<span class="code-quote">"hello_soap-databinding"</span>
-      implementor=<span class="code-quote">"org.apache.cxf.systest.jaxrs.jaxws.HelloWorldImpl"</span>
-      address=<span class="code-quote">"/hello-soap-databinding"</span>&gt;
+<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[
+  &lt;jaxrs:server id="hello_rest" address="/hello-rest"&gt;
+    &lt;jaxrs:serviceBeans&gt;
+      &lt;bean class="org.apache.cxf.systest.jaxrs.jaxws.HelloWorldImpl"/&gt;
+    &lt;/jaxrs:serviceBeans&gt;
+
+    &lt;jaxrs:providers&gt;
+      &lt;ref bean="jaxbProviderSoap"/&gt;
+    &lt;/jaxrs:providers&gt;
+  &lt;/jaxrs:server&gt;
+
+  &lt;jaxws:endpoint xmlns:s="http://hello.com"
+      serviceName="s:HelloWorld"
+      endpointName="s:HelloWorldPort"
+      id="hello_soap-databinding"
+      implementor="org.apache.cxf.systest.jaxrs.jaxws.HelloWorldImpl"
+      address="/hello-soap-databinding"&gt;
       
-      <span class="code-tag">&lt;jaxws:dataBinding&gt;</span>
-          <span class="code-tag">&lt;ref bean=<span class="code-quote">"jaxrs-data-binding"</span>/&gt;</span>
-      <span class="code-tag">&lt;/jaxws:dataBinding&gt;</span>
+      &lt;jaxws:dataBinding&gt;
+          &lt;ref bean="jaxrs-data-binding"/&gt;
+      &lt;/jaxws:dataBinding&gt;
       
-  <span class="code-tag">&lt;/jaxws:endpoint&gt;</span>        
+  &lt;/jaxws:endpoint&gt;        
  
-  <span class="code-tag">&lt;bean id=<span class="code-quote">"jaxrs-data-binding"</span> class=<span class="code-quote">"org.apache.cxf.jaxrs.provider.JAXRSDataBinding"</span>&gt;</span>
-      <span class="code-tag">&lt;property name=<span class="code-quote">"provider"</span> ref=<span class="code-quote">"jaxbProviderSoap"</span>/&gt;</span>
-  <span class="code-tag">&lt;/bean&gt;</span>
+  &lt;bean id="jaxrs-data-binding" class="org.apache.cxf.jaxrs.provider.JAXRSDataBinding"&gt;
+      &lt;property name="provider" ref="jaxbProviderSoap"/&gt;
+  &lt;/bean&gt;
 
-  <span class="code-tag">&lt;bean id=<span class="code-quote">"jaxbProviderSoap"</span> class=<span class="code-quote">"org.apache.cxf.jaxrs.provider.JAXBElementProvider"</span>/&gt;</span>
-</pre>
+  &lt;bean id="jaxbProviderSoap" class="org.apache.cxf.jaxrs.provider.JAXBElementProvider"/&gt;
+]]></script>
 </div></div> 
 
 <p>This option is similar to the one involving wrapping CXF DataBindings as JAX-RS providers and using them for handling the data for the JAX-RS endpoints. This time though it is SOAP endpoints which are relying on the JAX-RS providers to handle the data properly. </p>
@@ -840,69 +848,69 @@ Please see <a shape="rect" class="extern
 <p>If you would like to write your own custom XML provider and have it wrapped by the JAXRSDataBinding then custom MessageBodyReader and MessageBodyWriter implementations should be ready to accept null InputStream and OutputStream parameters and retrieve XMLStreamReader and XMLStreamWriter instances from the current CXF Message. To make the custom provider as portable as possible, one may want to follow the following approach :</p>
 
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-java">
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
 
-<span class="code-keyword">public</span> class PortableXMLProvider <span class="code-keyword">implements</span> MessageBodyReader, MessageBodyWriter {
+public class PortableXMLProvider implements MessageBodyReader, MessageBodyWriter {
 
-    <span class="code-keyword">public</span> <span class="code-object">Object</span> readFrom(<span class="code-object">Class</span>&lt;<span class="code-object">Object</span>&gt; type, Type genericType, Annotation[] anns, MediaType mt, 
-                           MultivaluedMap&lt;<span class="code-object">String</span>, <span class="code-object">String</span>&gt; headers, InputStream is) 
-                           <span class="code-keyword">throws</span> IOException {
+    public Object readFrom(Class&lt;Object&gt; type, Type genericType, Annotation[] anns, MediaType mt, 
+                           MultivaluedMap&lt;String, String&gt; headers, InputStream is) 
+                           throws IOException {
 
         XMLStreamReader reader = createReaderUsingStandardStaxApi(is);
-        <span class="code-keyword">return</span> readFromStream(reader);  
+        return readFromStream(reader);  
 
     }
 
-    <span class="code-keyword">public</span> void writeTo(<span class="code-object">Object</span> obj, <span class="code-object">Class</span>&lt;?&gt; cls, Type genericType, Annotation[] anns,  
-                        MediaType m, MultivaluedMap&lt;<span class="code-object">String</span>, <span class="code-object">Object</span>&gt; headers, OutputStream os)
-                        <span class="code-keyword">throws</span> IOException {
+    public void writeTo(Object obj, Class&lt;?&gt; cls, Type genericType, Annotation[] anns,  
+                        MediaType m, MultivaluedMap&lt;String, Object&gt; headers, OutputStream os)
+                        throws IOException {
         XMLStreamWriter writer = createWriterUsingStandardStaxApi(os);
         writeToStream(writer);  
     }
 
-    <span class="code-comment">// add more parameters <span class="code-keyword">if</span> needed
-</span>    <span class="code-keyword">protected</span> <span class="code-object">Object</span> readFromStream(XMLStreamReader reader) {
-        <span class="code-comment">// read from XMLStreamReader
-</span>    }
+    // add more parameters if needed
+    protected Object readFromStream(XMLStreamReader reader) {
+        // read from XMLStreamReader
+    }
     
-    <span class="code-comment">// add more parameters <span class="code-keyword">if</span> needed
-</span>    <span class="code-keyword">protected</span> void writeToStream(XMLStreamWriter writer) {
-        <span class="code-comment">// write to XMLStreamWriter
-</span>    }
+    // add more parameters if needed
+    protected void writeToStream(XMLStreamWriter writer) {
+        // write to XMLStreamWriter
+    }
 
     
 }
 
-<span class="code-keyword">public</span> class CXFCustomXMLProvider <span class="code-keyword">extends</span> PortableXMLProvider {
+public class CXFCustomXMLProvider extends PortableXMLProvider {
 
     @Override
-    <span class="code-keyword">public</span> <span class="code-object">Object</span> readFrom(<span class="code-object">Class</span>&lt;<span class="code-object">Object</span>&gt; type, Type genericType, Annotation[] anns, MediaType mt, 
-                           MultivaluedMap&lt;<span class="code-object">String</span>, <span class="code-object">String</span>&gt; headers, InputStream is) 
-                           <span class="code-keyword">throws</span> IOException {
+    public Object readFrom(Class&lt;Object&gt; type, Type genericType, Annotation[] anns, MediaType mt, 
+                           MultivaluedMap&lt;String, String&gt; headers, InputStream is) 
+                           throws IOException {
 
         XMLStreamReader reader = getStaxHandlerFromCurrentMessage(XMLStreamReader.class);
-        <span class="code-keyword">return</span> readFromStream(reader);  
+        return readFromStream(reader);  
 
     }
 
     @Override
-    <span class="code-keyword">public</span> void writeTo(<span class="code-object">Object</span> obj, <span class="code-object">Class</span>&lt;?&gt; cls, Type genericType, Annotation[] anns,  
-                        MediaType m, MultivaluedMap&lt;<span class="code-object">String</span>, <span class="code-object">Object</span>&gt; headers, OutputStream os)
-                        <span class="code-keyword">throws</span> IOException {
+    public void writeTo(Object obj, Class&lt;?&gt; cls, Type genericType, Annotation[] anns,  
+                        MediaType m, MultivaluedMap&lt;String, Object&gt; headers, OutputStream os)
+                        throws IOException {
         XMLStreamWriter writer = getStaxHandlerFromCurrentMessage(XMLStreamWriter.class);
         writeToStream(writer);  
     }
 
 
-    <span class="code-keyword">protected</span> &lt;T&gt; T getStaxHandlerFromCurrentMessage(<span class="code-object">Class</span>&lt;T&gt; staxCls) {
+    protected &lt;T&gt; T getStaxHandlerFromCurrentMessage(Class&lt;T&gt; staxCls) {
         Message m = PhaseInterceptorChain.getCurrentMessage();
-        <span class="code-keyword">if</span> (m != <span class="code-keyword">null</span>) {
-            <span class="code-keyword">return</span> staxCls.<span class="code-keyword">cast</span>(m.getContent(staxCls));
+        if (m != null) {
+            return staxCls.cast(m.getContent(staxCls));
         }
-        <span class="code-keyword">return</span> <span class="code-keyword">null</span>;
+        return null;
     }
 }
-</pre>
+]]></script>
 </div></div>
 
 <p>Please note that if you need the advanced DataBinding support for your JAX-WS endpoints (such as the schema validation with the schemas being available in the WSDL documents - likely to be supported, un-wrapping the XML payloads into multiple method parameters) then you are recommended to use one of the CXF DataBindings supported by CXF JAX-WS endpoints directly. </p>
@@ -918,16 +926,16 @@ Please see <a shape="rect" class="extern
 <p>1. Using jaxrs:schemaLocations element</p>
 
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-xml">
-<span class="code-tag">&lt;beans&gt;</span>
-<span class="code-tag">&lt;jaxrs:server address=<span class="code-quote">"/"</span> serviceClass=<span class="code-quote">"org.apache.cxf.systest.jaxrs.BookStore"</span>&gt;</span>
-  <span class="code-tag">&lt;jaxrs:schemaLocations&gt;</span>
-     <span class="code-tag">&lt;jaxrs:schemaLocation&gt;</span>classpath:/schemas/a.xsd<span class="code-tag">&lt;/jaxrs:schemaLocation&gt;</span>
-     <span class="code-tag">&lt;jaxrs:schemaLocation&gt;</span>classpath:/schemas/b.xsd<span class="code-tag">&lt;/jaxrs:schemaLocation&gt;</span>
-  <span class="code-tag">&lt;/jaxrs:schemaLocations&gt;</span>
-<span class="code-tag">&lt;/jaxrs:server&gt;</span>
-<span class="code-tag">&lt;/beans&gt;</span>
-</pre>
+<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[
+&lt;beans&gt;
+&lt;jaxrs:server address="/" serviceClass="org.apache.cxf.systest.jaxrs.BookStore"&gt;
+  &lt;jaxrs:schemaLocations&gt;
+     &lt;jaxrs:schemaLocation&gt;classpath:/schemas/a.xsd&lt;/jaxrs:schemaLocation&gt;
+     &lt;jaxrs:schemaLocation&gt;classpath:/schemas/b.xsd&lt;/jaxrs:schemaLocation&gt;
+  &lt;/jaxrs:schemaLocations&gt;
+&lt;/jaxrs:server&gt;
+&lt;/beans&gt;
+]]></script>
 </div></div>
 
 <p>Using this option is handy when you have multiple bindings involved which support the schema validation. In this case<br clear="none">
@@ -938,55 +946,55 @@ individual MessageBodyReader implementat
 <p>JAXB and JSON providers can be configured explicitly, for example:</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;jaxrs:server address=<span class="code-quote">"/"</span> serviceClass=<span class="code-quote">"org.apache.cxf.systest.jaxrs.BookStore"</span>&gt;</span>
- <span class="code-tag">&lt;jaxrs:providers&gt;</span>
-   <span class="code-tag">&lt;ref bean=<span class="code-quote">"jaxbProvider"</span>/&gt;</span>
- <span class="code-tag">&lt;/jaxrs:providers&gt;</span>
-<span class="code-tag">&lt;/jaxrs:server&gt;</span>
-
-<span class="code-tag">&lt;bean id=<span class="code-quote">"jaxbProvider"</span> class=<span class="code-quote">"org.apache.cxf.jaxrs.provider.JAXBElementProvider"</span>&gt;</span>
-   <span class="code-tag">&lt;property name=<span class="code-quote">"schemaLocations"</span> ref=<span class="code-quote">"schemaHolder"</span>/&gt;</span>
-<span class="code-tag">&lt;/bean&gt;</span>
+<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[
+&lt;beans xmlns:util="http://www.springframework.org/schema/util"&gt;
+&lt;jaxrs:server address="/" serviceClass="org.apache.cxf.systest.jaxrs.BookStore"&gt;
+ &lt;jaxrs:providers&gt;
+   &lt;ref bean="jaxbProvider"/&gt;
+ &lt;/jaxrs:providers&gt;
+&lt;/jaxrs:server&gt;
+
+&lt;bean id="jaxbProvider" class="org.apache.cxf.jaxrs.provider.JAXBElementProvider"&gt;
+   &lt;property name="schemaLocations" ref="schemaHolder"/&gt;
+&lt;/bean&gt;
   
-<span class="code-tag">&lt;util:list id=<span class="code-quote">"theSchemas"</span>&gt;</span>
-  <span class="code-tag">&lt;value&gt;</span>classpath:/WEB-INF/schemas/bookid.xsd<span class="code-tag">&lt;/value&gt;</span>
-  <span class="code-tag">&lt;value&gt;</span>classpath:/org/apache/cxf/systest/jaxrs/resources/book.xsd<span class="code-tag">&lt;/value&gt;</span>
-<span class="code-tag">&lt;/util:list&gt;</span>
-<span class="code-tag">&lt;/beans&gt;</span>
-</pre>
+&lt;util:list id="theSchemas"&gt;
+  &lt;value&gt;classpath:/WEB-INF/schemas/bookid.xsd&lt;/value&gt;
+  &lt;value&gt;classpath:/org/apache/cxf/systest/jaxrs/resources/book.xsd&lt;/value&gt;
+&lt;/util:list&gt;
+&lt;/beans&gt;
+]]></script>
 </div></div>
 
 <p>If you have both JAXB and JSON providers validating the input data then you can get schemas shared between them, for example:</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;jaxrs:server address=<span class="code-quote">"/"</span> serviceClass=<span class="code-quote">"org.apache.cxf.systest.jaxrs.BookStore"</span>&gt;</span>
-  <span class="code-tag">&lt;jaxrs:providers&gt;</span>
-   <span class="code-tag">&lt;ref bean=<span class="code-quote">"jaxbProvider"</span>/&gt;</span>
-   <span class="code-tag">&lt;ref bean=<span class="code-quote">"jsonProvider"</span>/&gt;</span>
-  <span class="code-tag">&lt;/jaxrs:providers&gt;</span>
- <span class="code-tag">&lt;/jaxrs:server&gt;</span>
-
-<span class="code-tag">&lt;bean id=<span class="code-quote">"jaxbProvider"</span> class=<span class="code-quote">"org.apache.cxf.jaxrs.provider.JAXBElementProvider"</span>&gt;</span>
-   <span class="code-tag">&lt;property name=<span class="code-quote">"schemaHandler"</span> ref=<span class="code-quote">"schemaHolder"</span>/&gt;</span>
-<span class="code-tag">&lt;/bean&gt;</span>
-
-<span class="code-tag">&lt;bean id=<span class="code-quote">"jsonProvider"</span> class=<span class="code-quote">"org.apache.cxf.jaxrs.provider.json.JSONProvider"</span>&gt;</span>
-   <span class="code-tag">&lt;property name=<span class="code-quote">"schemaHandler"</span> ref=<span class="code-quote">"schemaHolder"</span>/&gt;</span>
-<span class="code-tag">&lt;/bean&gt;</span>
+<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[
+&lt;beans xmlns:util="http://www.springframework.org/schema/util"&gt;
+ &lt;jaxrs:server address="/" serviceClass="org.apache.cxf.systest.jaxrs.BookStore"&gt;
+  &lt;jaxrs:providers&gt;
+   &lt;ref bean="jaxbProvider"/&gt;
+   &lt;ref bean="jsonProvider"/&gt;
+  &lt;/jaxrs:providers&gt;
+ &lt;/jaxrs:server&gt;
+
+&lt;bean id="jaxbProvider" class="org.apache.cxf.jaxrs.provider.JAXBElementProvider"&gt;
+   &lt;property name="schemaHandler" ref="schemaHolder"/&gt;
+&lt;/bean&gt;
+
+&lt;bean id="jsonProvider" class="org.apache.cxf.jaxrs.provider.json.JSONProvider"&gt;
+   &lt;property name="schemaHandler" ref="schemaHolder"/&gt;
+&lt;/bean&gt;
   
-<span class="code-tag">&lt;bean id=<span class="code-quote">"schemaHolder"</span> class=<span class="code-quote">"org.apache.cxf.jaxrs.utils.schemas.SchemaHandler"</span>&gt;</span>
-   <span class="code-tag">&lt;property name=<span class="code-quote">"schemas"</span> ref=<span class="code-quote">"theSchemas"</span>/&gt;</span>
-<span class="code-tag">&lt;/bean&gt;</span>
+&lt;bean id="schemaHolder" class="org.apache.cxf.jaxrs.utils.schemas.SchemaHandler"&gt;
+   &lt;property name="schemas" ref="theSchemas"/&gt;
+&lt;/bean&gt;
   
-<span class="code-tag">&lt;util:list id=<span class="code-quote">"theSchemas"</span>&gt;</span>
-  <span class="code-tag">&lt;value&gt;</span>classpath:/WEB-INF/schemas/bookid.xsd<span class="code-tag">&lt;/value&gt;</span>
-  <span class="code-tag">&lt;value&gt;</span>classpath:/org/apache/cxf/systest/jaxrs/resources/book.xsd<span class="code-tag">&lt;/value&gt;</span>
-<span class="code-tag">&lt;/util:list&gt;</span>
-<span class="code-tag">&lt;/beans&gt;</span>
-</pre>
+&lt;util:list id="theSchemas"&gt;
+  &lt;value&gt;classpath:/WEB-INF/schemas/bookid.xsd&lt;/value&gt;
+  &lt;value&gt;classpath:/org/apache/cxf/systest/jaxrs/resources/book.xsd&lt;/value&gt;
+&lt;/util:list&gt;
+&lt;/beans&gt;
+]]></script>
 </div></div>
 
 <h2><a shape="rect" name="JAX-RSDataBindings-Supportforcatalogs"></a>Support for catalogs</h2>
@@ -997,22 +1005,22 @@ individual MessageBodyReader implementat
 By default, a "META-INF/jax-rs-catalog.xml" will be checked however the catalog location can be set either on JAXBElementProvider or JSONProvider:</p>
 
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-xml">
-<span class="code-tag">&lt;bean id=<span class="code-quote">"jaxbProvider"</span> class=<span class="code-quote">"org.apache.cxf.jaxrs.provider.JAXBElementProvider"</span>&gt;</span>
-   <span class="code-tag">&lt;property name=<span class="code-quote">"catalogLocation"</span> value=<span class="code-quote">"classpath:/schemas/mycatalog.xml"</span>/&gt;</span>
-<span class="code-tag">&lt;/bean&gt;</span>
+<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[
+&lt;bean id="jaxbProvider" class="org.apache.cxf.jaxrs.provider.JAXBElementProvider"&gt;
+   &lt;property name="catalogLocation" value="classpath:/schemas/mycatalog.xml"/&gt;
+&lt;/bean&gt;
 
-</pre>
+]]></script>
 </div></div>
 
 <p>where mycatalog.xml may look like this:</p>
 
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-xml">
-<span class="code-tag">&lt;catalog xmlns=<span class="code-quote">"urn:oasis:names:tc:entity:<span class="code-keyword">xmlns:xml:catalog"&gt; prefer=<span class="code-quote">"system"</span>&gt;</span>
-    <span class="code-tag">&lt;system systemId=<span class="code-quote">"http://schemas/bookid.xsd"</span> uri=<span class="code-quote">"classpath:WEB-INF/schemas/bookid.xsd"</span>/&gt;</span>
-<span class="code-tag">&lt;/catalog&gt;</span>
-</span></span></pre>
+<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[
+&lt;catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog" prefer="system"&gt;
+    &lt;system systemId="http://schemas/bookid.xsd" uri="classpath:WEB-INF/schemas/bookid.xsd"/&gt;
+&lt;/catalog&gt;
+]]></script>
 </div></div>
 
 
@@ -1030,42 +1038,42 @@ Starting from CXF 2.3.4 and 2.4, the fol
 <p>You can enable the <a shape="rect" class="external-link" href="https://fi.dev.java.net/standardization.html" rel="nofollow">FastInfoset</a> by explicitly registering CXF FastInfoset interceptors with a JAXRS endpoint and configuring JAXBElementProvider to support an "application/fastinfoset" media type :<br clear="none">
 for example :</p>
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-xml">
+<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[
 
-<span class="code-tag">&lt;jaxrs:server id=<span class="code-quote">"restservice3"</span> address=<span class="code-quote">"/rest3"</span>&gt;</span>
+&lt;jaxrs:server id="restservice3" address="/rest3"&gt;
 
- <span class="code-tag">&lt;jaxrs:serviceBeans&gt;</span>
-  <span class="code-tag">&lt;ref bean=<span class="code-quote">"bookstore"</span>/&gt;</span>
- <span class="code-tag">&lt;/jaxrs:serviceBeans&gt;</span>
-
- <span class="code-tag">&lt;jaxrs:providers&gt;</span>
-  <span class="code-tag">&lt;ref bean=<span class="code-quote">"jaxbProvider"</span>/&gt;</span>
- <span class="code-tag">&lt;/jaxrs:providers&gt;</span>
-
- <span class="code-tag">&lt;jaxrs:outInterceptors&gt;</span>
-  <span class="code-tag">&lt;ref bean=<span class="code-quote">"fastInfosetOutInterceptor"</span>/&gt;</span>
- <span class="code-tag">&lt;/jaxrs:outInterceptors&gt;</span>
-
- <span class="code-tag">&lt;jaxrs:inInterceptors&gt;</span>
-  <span class="code-tag">&lt;ref bean=<span class="code-quote">"fastInfosetInInterceptor"</span>/&gt;</span>
- <span class="code-tag">&lt;/jaxrs:inInterceptors&gt;</span>
-
- <span class="code-tag">&lt;jaxrs:properties&gt;</span>
-  <span class="code-tag">&lt;entry key=<span class="code-quote">"org.apache.cxf.endpoint.private"</span> value=<span class="code-quote">"true"</span>/&gt;</span>
- <span class="code-tag">&lt;/jaxrs:properties&gt;</span>
-<span class="code-tag">&lt;/jaxrs:server&gt;</span>
-
-<span class="code-tag">&lt;util:list id=<span class="code-quote">"fastinfosetType"</span>&gt;</span>
-  <span class="code-tag">&lt;value&gt;</span>application/fastinfoset<span class="code-tag">&lt;/value&gt;</span>
-<span class="code-tag">&lt;/util:list&gt;</span>
-
-<span class="code-tag">&lt;bean id=<span class="code-quote">"jaxbProvider"</span> class=<span class="code-quote">"org.apache.cxf.jaxrs.provider.JAXBElementProvider"</span>&gt;</span>
-  <span class="code-tag">&lt;property name=<span class="code-quote">"produceMediaTypes"</span> ref=<span class="code-quote">"fastinfosetType"</span>/&gt;</span>
-  <span class="code-tag">&lt;property name=<span class="code-quote">"consumeMediaTypes"</span> ref=<span class="code-quote">"fastinfosetType"</span>/&gt;</span>
-<span class="code-tag">&lt;/bean&gt;</span>
-<span class="code-tag">&lt;bean id=<span class="code-quote">"fastInfosetOutInterceptor"</span> class=<span class="code-quote">"org.apache.cxf.interceptor.FIStaxOutInterceptor"</span>/&gt;</span>
-<span class="code-tag">&lt;bean id=<span class="code-quote">"fastInfosetInInterceptor"</span> class=<span class="code-quote">"org.apache.cxf.interceptor.FIStaxInInterceptor"</span>/&gt;</span>
-</pre>
+ &lt;jaxrs:serviceBeans&gt;
+  &lt;ref bean="bookstore"/&gt;
+ &lt;/jaxrs:serviceBeans&gt;
+
+ &lt;jaxrs:providers&gt;
+  &lt;ref bean="jaxbProvider"/&gt;
+ &lt;/jaxrs:providers&gt;
+
+ &lt;jaxrs:outInterceptors&gt;
+  &lt;ref bean="fastInfosetOutInterceptor"/&gt;
+ &lt;/jaxrs:outInterceptors&gt;
+
+ &lt;jaxrs:inInterceptors&gt;
+  &lt;ref bean="fastInfosetInInterceptor"/&gt;
+ &lt;/jaxrs:inInterceptors&gt;
+
+ &lt;jaxrs:properties&gt;
+  &lt;entry key="org.apache.cxf.endpoint.private" value="true"/&gt;
+ &lt;/jaxrs:properties&gt;
+&lt;/jaxrs:server&gt;
+
+&lt;util:list id="fastinfosetType"&gt;
+  &lt;value&gt;application/fastinfoset&lt;/value&gt;
+&lt;/util:list&gt;
+
+&lt;bean id="jaxbProvider" class="org.apache.cxf.jaxrs.provider.JAXBElementProvider"&gt;
+  &lt;property name="produceMediaTypes" ref="fastinfosetType"/&gt;
+  &lt;property name="consumeMediaTypes" ref="fastinfosetType"/&gt;
+&lt;/bean&gt;
+&lt;bean id="fastInfosetOutInterceptor" class="org.apache.cxf.interceptor.FIStaxOutInterceptor"/&gt;
+&lt;bean id="fastInfosetInInterceptor" class="org.apache.cxf.interceptor.FIStaxInInterceptor"/&gt;
+]]></script>
 </div></div>
 
 <p>Note that explicitly registering the interceptors is not required anymore given that CXF FastInfoset and Feature annotations are also currently supported.</p></div>

Modified: websites/production/cxf/content/docs/jax-rs-deployment.html
==============================================================================
--- websites/production/cxf/content/docs/jax-rs-deployment.html (original)
+++ websites/production/cxf/content/docs/jax-rs-deployment.html Mon Jun 24 17:10:51 2013
@@ -25,6 +25,18 @@
 <meta http-equiv="Content-type" content="text/html;charset=UTF-8">
 <meta name="keywords" content="business integration, EAI, SOA, Service Oriented Architecture, web services, SOAP, JBI, JMS, WSDL, XML, EDI, Electronic Data Interchange, standards support, integration standards, application integration, middleware, software, solutions, services, CXF, open source">
 <meta name="description" content="Apache CXF, Services Framework - JAX-RS Deployment">
+
+  <link href='http://cxf.apache.org/resources/highlighter/styles/shCore.css' rel='stylesheet' type='text/css' />
+  <link href='http://cxf.apache.org/resources/highlighter/styles/shThemeCXF.css' rel='stylesheet' type='text/css' />
+  <script src='http://cxf.apache.org/resources/highlighter/scripts/shCore.js' type='text/javascript'></script>
+  <script src='http://cxf.apache.org/resources/highlighter/scripts/shBrushJava.js' type='text/javascript'></script>
+  <script src='http://cxf.apache.org/resources/highlighter/scripts/shBrushXml.js' type='text/javascript'></script>
+  
+  <script type="text/javascript">
+  SyntaxHighlighter.defaults['toolbar'] = false;
+  SyntaxHighlighter.all();
+  </script>
+ 
     <title>
 Apache CXF -- JAX-RS Deployment
     </title>
@@ -42,19 +54,15 @@ Apache CXF -- JAX-RS Deployment
     <td id="cell-1-0">&nbsp;</td>
     <td id="cell-1-1">&nbsp;</td>
     <td id="cell-1-2">
-      <div style="padding: 5px;">
-        <div id="banner">
-          <!-- Banner -->
-<div id="banner-content">
+      <!-- Banner -->
+<div class="banner" id="banner"><p>
 <table border="0" cellpadding="0" cellspacing="0" width="100%"><tr><td align="left" colspan="1" nowrap>
 <a shape="rect" href="http://cxf.apache.org/" title="Apache CXF"><span style="font-weight: bold; font-size: 170%; color: white">Apache CXF</span></a>
 </td><td align="right" colspan="1" nowrap>
 <a shape="rect" href="http://www.apache.org/" title="The Apache Sofware Foundation"><img border="0" alt="ASF Logo" src="http://cxf.apache.org/images/asf-logo.png"></a>
 </td></tr></table>
-</div>
-          <!-- Banner -->
-        </div>
-      </div>
+</p></div>
+      <!-- Banner -->
       <div id="top-menu">
         <table border="0" cellpadding="1" cellspacing="0" width="100%">
           <tr>
@@ -94,7 +102,7 @@ Apache CXF -- JAX-RS Deployment
 
 
 <hr>
-<ul class="alternate" type="square"><li>Search
+<ul class="alternate" type="square"><li>Search<br clear="none">
 
 <form enctype="application/x-www-form-urlencoded" method="get" id="cse-search-box" action="http://www.google.com/cse">
   <div>
@@ -158,12 +166,12 @@ use a <a shape="rect" href="http://cxf.a
 
 <p>If you configure CXFServlet to redirect to custom JSP pages then you need to add the following declaration to web.xml:</p>
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-xml">
-<span class="code-tag">&lt;servlet&gt;</span>
- <span class="code-tag">&lt;servlet-name&gt;</span>jsp<span class="code-tag">&lt;/servlet-name&gt;</span>
- <span class="code-tag">&lt;servlet-class&gt;</span>weblogic.servlet.JSPServlet<span class="code-tag">&lt;/servlet-class&gt;</span>
-<span class="code-tag">&lt;/servlet&gt;</span> 
-</pre>
+<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[
+&lt;servlet&gt;
+ &lt;servlet-name&gt;jsp&lt;/servlet-name&gt;
+ &lt;servlet-class&gt;weblogic.servlet.JSPServlet&lt;/servlet-class&gt;
+&lt;/servlet&gt; 
+]]></script>
 </div></div>
 
 <h3><a shape="rect" name="JAX-RSDeployment-CXFRuntimeDelegate"></a>CXF RuntimeDelegate</h3>
@@ -174,12 +182,12 @@ use a <a shape="rect" href="http://cxf.a
 
 <p>WebLogic requires the following update to the proprietary deployment descriptor weblogic.xml:</p>
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-xml">
-  <span class="code-tag">&lt;container-descriptor&gt;</span>
-   <span class="code-tag"><span class="code-comment">&lt;!-- SNIP --&gt;</span></span>
-   <span class="code-tag">&lt;prefer-web-inf-classes&gt;</span>true<span class="code-tag">&lt;/prefer-web-inf-classes&gt;</span>
-  <span class="code-tag">&lt;/container-descriptor&gt;</span>
-</pre>
+<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[
+  &lt;container-descriptor&gt;
+   &lt;!-- SNIP --&gt;
+   &lt;prefer-web-inf-classes&gt;true&lt;/prefer-web-inf-classes&gt;
+  &lt;/container-descriptor&gt;
+]]></script>
 </div></div>
 
 <p>This instructs WebLogic's classloaders to look FIRST in the JARS from the application's WEB-INF/lib directory for Service Provider Implementations (in this case, to find META-INF/services/javax.xml.stream.XMLInputFactory in the Woodstox JAR) rather than to the system classloader.<br clear="none">



Mime
View raw message