cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From build...@apache.org
Subject svn commit: r823758 - in /websites/production/cxf/content: cache/docs.pageCache docs/jax-rs-data-bindings.html docs/servlet-transport.html
Date Fri, 29 Jun 2012 17:47:59 GMT
Author: buildbot
Date: Fri Jun 29 17:47:58 2012
New Revision: 823758

Log:
Production update by buildbot for cxf

Modified:
    websites/production/cxf/content/cache/docs.pageCache
    websites/production/cxf/content/docs/jax-rs-data-bindings.html
    websites/production/cxf/content/docs/servlet-transport.html

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

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 Fri Jun 29 17:47:58 2012
@@ -124,7 +124,7 @@ Apache CXF -- JAX-RS Data Bindings
 <div id="ConfluenceContent"><p><span style="font-size:2em;font-weight:bold">
JAX-RS : Data Bindings </span></p>
 
 <div>
-<ul><li><a shape="rect" href="#JAX-RSDataBindings-JAXBsupport">JAXB support</a></li><ul><li><a
shape="rect" href="#JAX-RSDataBindings-ConfiguringJAXBprovider">Configuring JAXB provider</a></li><li><a
shape="rect" href="#JAX-RSDataBindings-JAXBandMoxy">JAXB and Moxy</a></li></ul><li><a
shape="rect" href="#JAX-RSDataBindings-JSONsupport">JSON support</a></li><ul><li><a
shape="rect" href="#JAX-RSDataBindings-Jettison">Jettison</a></li><ul><li><a
shape="rect" href="#JAX-RSDataBindings-ConfiguringJSONprovider">Configuring JSON provider</a></li><li><a
shape="rect" href="#JAX-RSDataBindings-DealingwithJSONarrayserializationissues">Dealing
with JSON array serialization issues</a></li><li><a shape="rect" href="#JAX-RSDataBindings-BadgerFishconvention">BadgerFish
convention</a></li><li><a shape="rect" href="#JAX-RSDataBindings-WrappingandUnwrappingJSONsequences">Wrapping
and Unwrapping JSON sequences</a></li><li><a shape="rect" href="#JAX-RSDataBindings-TypeConverters">TypeConverters<
 /a></li></ul><li><a shape="rect" href="#JAX-RSDataBindings-Jackson">Jackson</a></li></ul><li><a
shape="rect" href="#JAX-RSDataBindings-CommonJAXBandJSONconfiguration">Common JAXB and
JSON configuration</a></li><ul><li><a shape="rect" href="#JAX-RSDataBindings-SingleJAXBContextandextrauserclasses">Single
JAXBContext and extra user classes</a></li><li><a shape="rect" href="#JAX-RSDataBindings-AutomaticJAXBElementconversionduringserialization">Automatic
JAXBElement conversion during serialization</a></li><li><a shape="rect"
href="#JAX-RSDataBindings-HandlingJAXBbeanswithoutXmlRootElementannotations">Handling JAXB
beans without XmlRootElement annotations</a></li><li><a shape="rect"
href="#JAX-RSDataBindings-Handlingexplicitcollections">Handling explicit collections</a></li></ul><li><a
shape="rect" href="#JAX-RSDataBindings-CustomizingJAXBXMLandJSONinputandoutput">Customizing
JAXB XML and JSON input and output</a></li><li><a shape="rect" href="#JAX-RSDataBindings-ControllingLarge
 JAXBXMLandJSONinputpayloads">Controlling Large JAXB XML and JSON input payloads</a></li><li><a
shape="rect" href="#JAX-RSDataBindings-JSONWithPadding">JSON With Padding</a></li><li><a
shape="rect" href="#JAX-RSDataBindings-Formpayloads">Form payloads</a></li><li><a
shape="rect" href="#JAX-RSDataBindings-Atom">Atom</a></li><li><a shape="rect"
href="#JAX-RSDataBindings-AegisDataBinding">Aegis Data Binding</a></li><li><a
shape="rect" href="#JAX-RSDataBindings-XMLBeans">XMLBeans</a></li><li><a
shape="rect" href="#JAX-RSDataBindings-CXFDataBindingsasJAXRSproviders">CXF DataBindings
as JAX-RS providers</a></li><li><a shape="rect" href="#JAX-RSDataBindings-JAXRSDataBinding">JAXRS
DataBinding</a></li><li><a shape="rect" href="#JAX-RSDataBindings-Schemavalidation">Schema
validation</a></li><ul><li><a shape="rect" href="#JAX-RSDataBindings-Outputvalidation">Output
validation</a></li></ul><li><a shape="rect" href="#JAX-RSDataBindings-FastInfoset">Fast
Infoset</a></li></ul></div>
+<ul><li><a shape="rect" href="#JAX-RSDataBindings-JAXBsupport">JAXB support</a></li><ul><li><a
shape="rect" href="#JAX-RSDataBindings-ConfiguringJAXBprovider">Configuring JAXB provider</a></li><li><a
shape="rect" href="#JAX-RSDataBindings-JAXBandMoxy">JAXB and Moxy</a></li></ul><li><a
shape="rect" href="#JAX-RSDataBindings-JSONsupport">JSON support</a></li><ul><li><a
shape="rect" href="#JAX-RSDataBindings-Jettison">Jettison</a></li><ul><li><a
shape="rect" href="#JAX-RSDataBindings-ConfiguringJSONprovider">Configuring JSON provider</a></li><li><a
shape="rect" href="#JAX-RSDataBindings-DealingwithJSONarrayserializationissues">Dealing
with JSON array serialization issues</a></li><li><a shape="rect" href="#JAX-RSDataBindings-BadgerFishconvention">BadgerFish
convention</a></li><li><a shape="rect" href="#JAX-RSDataBindings-WrappingandUnwrappingJSONsequences">Wrapping
and Unwrapping JSON sequences</a></li><li><a shape="rect" href="#JAX-RSDataBindings-TypeConverters">TypeConverters<
 /a></li></ul><li><a shape="rect" href="#JAX-RSDataBindings-Jackson">Jackson</a></li></ul><li><a
shape="rect" href="#JAX-RSDataBindings-CommonJAXBandJSONconfiguration">Common JAXB and
JSON configuration</a></li><ul><li><a shape="rect" href="#JAX-RSDataBindings-SingleJAXBContextandextrauserclasses">Single
JAXBContext and extra user classes</a></li><li><a shape="rect" href="#JAX-RSDataBindings-AutomaticJAXBElementconversionduringserialization">Automatic
JAXBElement conversion during serialization</a></li><li><a shape="rect"
href="#JAX-RSDataBindings-HandlingJAXBbeanswithoutXmlRootElementannotations">Handling JAXB
beans without XmlRootElement annotations</a></li><li><a shape="rect"
href="#JAX-RSDataBindings-Handlingexplicitcollections">Handling explicit collections</a></li></ul><li><a
shape="rect" href="#JAX-RSDataBindings-CustomizingJAXBXMLandJSONinputandoutput">Customizing
JAXB XML and JSON input and output</a></li><li><a shape="rect" href="#JAX-RSDataBindings-ControllingLarge
 JAXBXMLandJSONinputpayloads">Controlling Large JAXB XML and JSON input payloads</a></li><li><a
shape="rect" href="#JAX-RSDataBindings-JSONWithPadding">JSON With Padding</a></li><li><a
shape="rect" href="#JAX-RSDataBindings-Formpayloads">Form payloads</a></li><li><a
shape="rect" href="#JAX-RSDataBindings-Atom">Atom</a></li><li><a shape="rect"
href="#JAX-RSDataBindings-AegisDataBinding">Aegis Data Binding</a></li><li><a
shape="rect" href="#JAX-RSDataBindings-XMLBeans">XMLBeans</a></li><li><a
shape="rect" href="#JAX-RSDataBindings-CXFDataBindingsasJAXRSproviders">CXF DataBindings
as JAX-RS providers</a></li><li><a shape="rect" href="#JAX-RSDataBindings-JAXRSDataBinding">JAXRS
DataBinding</a></li><li><a shape="rect" href="#JAX-RSDataBindings-Schemavalidation">Schema
validation</a></li><ul><li><a shape="rect" href="#JAX-RSDataBindings-Supportforcatalogs">Support
for catalogs</a></li><li><a shape="rect" href="#JAX-RSDataBindings-Outputvalidation">Output
validation</a></li></ul><li
 ><a shape="rect" href="#JAX-RSDataBindings-FastInfoset">Fast Infoset</a></li></ul></div>
 
 <h1><a shape="rect" name="JAX-RSDataBindings-JAXBsupport"></a>JAXB support</h1>
 
@@ -983,6 +983,33 @@ individual MessageBodyReader implementat
 </pre>
 </div></div>
 
+<h2><a shape="rect" name="JAX-RSDataBindings-Supportforcatalogs"></a>Support
for catalogs</h2>
+
+<p>Available starting from CXF 2.5.5, 2.6.2</p>
+
+<p>XML Catalogs can be used for the main schema (which is used to validate the data)
to get the imported or included schema resources resolved locally.<br clear="none">
+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>
+
+</pre>
+</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>
+</div></div>
+
+
 <h2><a shape="rect" name="JAX-RSDataBindings-Outputvalidation"></a>Output
validation</h2>
 
 <p>By default, after a valid schema has been located, only JAXB Unmarshaller will use
it to validate the input.<br clear="none">

Modified: websites/production/cxf/content/docs/servlet-transport.html
==============================================================================
--- websites/production/cxf/content/docs/servlet-transport.html (original)
+++ websites/production/cxf/content/docs/servlet-transport.html Fri Jun 29 17:47:58 2012
@@ -265,6 +265,85 @@ Apache CXF -- Servlet Transport
 
 <p>Finally, DefaultCXFServlet serves a requested book.html.</p>
 
+<h2><a shape="rect" name="ServletTransport-Servingwelcomepages"></a>Serving
welcome pages</h2>
+
+<p>Starting from CXF 2.5.5 and 2.6.2 it is possible to configure CXFServlet to serve
welcome pages in a number of ways.</p>
+
+<p>For example, lets assume we have a web application called "webapp" which has a root
resource called "index.html".<br clear="none">
+For CXFServlet to support both "/webapp" and "/webapp/index.html" requests returning "index.html",
while letting all other requests to proceed to the actual endpoints, the following can be
done.</p>
+
+<p>Option1. Delegating to Default Servlet</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>CXFServlet<span
class="code-tag">&lt;/servlet-name&gt;</span>
+        <span class="code-tag">&lt;display-name&gt;</span>CXF Servlet<span
class="code-tag">&lt;/display-name&gt;</span>
+        <span class="code-tag">&lt;servlet-class&gt;</span>
+            org.apache.cxf.transport.servlet.CXFServlet
+        <span class="code-tag">&lt;/servlet-class&gt;</span>
+        <span class="code-tag">&lt;init-param&gt;</span>
+            <span class="code-tag">&lt;param-name&gt;</span>redirects-list<span
class="code-tag">&lt;/param-name&gt;</span>
+            <span class="code-tag">&lt;param-value&gt;</span>
+              /
+              /index.html
+            <span class="code-tag">&lt;/param-value&gt;</span>
+        <span class="code-tag">&lt;/init-param&gt;</span>
+        <span class="code-tag">&lt;init-param&gt;</span>
+            <span class="code-tag">&lt;param-name&gt;</span>redirect-attributes<span
class="code-tag">&lt;/param-name&gt;</span>
+            <span class="code-tag">&lt;param-value&gt;</span>
+              javax.servlet.include.request_uri
+            <span class="code-tag">&lt;/param-value&gt;</span>
+        <span class="code-tag">&lt;/init-param&gt;</span>
+        <span class="code-tag">&lt;init-param&gt;</span>
+            <span class="code-tag">&lt;param-name&gt;</span>redirect-servlet-name<span
class="code-tag">&lt;/param-name&gt;</span>
+            <span class="code-tag">&lt;param-value&gt;</span>default<span
class="code-tag">&lt;/param-value&gt;</span>
+        <span class="code-tag">&lt;/init-param&gt;</span>
+        <span class="code-tag">&lt;load-on-startup&gt;</span>1<span
class="code-tag">&lt;/load-on-startup&gt;</span>
+    <span class="code-tag">&lt;/servlet&gt;</span>
+        <span class="code-tag">&lt;servlet-mapping&gt;</span>
+        <span class="code-tag">&lt;servlet-name&gt;</span>CXFServlet<span
class="code-tag">&lt;/servlet-name&gt;</span>
+        <span class="code-tag">&lt;url-pattern&gt;</span>/*<span class="code-tag">&lt;/url-pattern&gt;</span>
+    <span class="code-tag">&lt;/servlet-mapping&gt;</span>
+
+        <span class="code-tag">&lt;welcome-file-list&gt;</span>
+        <span class="code-tag">&lt;welcome-file&gt;</span>index.html<span
class="code-tag">&lt;/welcome-file&gt;</span>
+    <span class="code-tag">&lt;/welcome-file-list&gt;</span>
+</pre>
+</div></div>
+
+<p>Note that the redirects-list parameter has two space separated values, "/" and "index.html".<br
clear="none">
+The request attribute 'javax.servlet.include.request_uri' might need to be set for the underlying
container like Jetty to successfully read "index.html".</p>
+
+<p>Option2. Using CXFServlet itself to read index.html</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>CXFServlet<span
class="code-tag">&lt;/servlet-name&gt;</span>
+        <span class="code-tag">&lt;display-name&gt;</span>CXF Servlet<span
class="code-tag">&lt;/display-name&gt;</span>
+        <span class="code-tag">&lt;servlet-class&gt;</span>
+            org.apache.cxf.transport.servlet.CXFServlet
+        <span class="code-tag">&lt;/servlet-class&gt;</span>
+        <span class="code-tag">&lt;init-param&gt;</span>
+            <span class="code-tag">&lt;param-name&gt;</span>static-welcome-file<span
class="code-tag">&lt;/param-name&gt;</span>
+            <span class="code-tag">&lt;param-value&gt;</span>/index.html<span
class="code-tag">&lt;/param-value&gt;</span>
+        <span class="code-tag">&lt;/init-param&gt;</span> 
+        <span class="code-tag">&lt;init-param&gt;</span>
+            <span class="code-tag">&lt;param-name&gt;</span>static-resources-list<span
class="code-tag">&lt;/param-name&gt;</span>
+            <span class="code-tag">&lt;param-value&gt;</span>/index.html<span
class="code-tag">&lt;/param-value&gt;</span>
+        <span class="code-tag">&lt;/init-param&gt;</span> 
+        <span class="code-tag">&lt;load-on-startup&gt;</span>1<span
class="code-tag">&lt;/load-on-startup&gt;</span>
+    <span class="code-tag">&lt;/servlet&gt;</span>
+        <span class="code-tag">&lt;servlet-mapping&gt;</span>
+        <span class="code-tag">&lt;servlet-name&gt;</span>CXFServlet<span
class="code-tag">&lt;/servlet-name&gt;</span>
+        <span class="code-tag">&lt;url-pattern&gt;</span>/*<span class="code-tag">&lt;/url-pattern&gt;</span>
+    <span class="code-tag">&lt;/servlet-mapping&gt;</span>
+</pre>
+</div></div>
+
+
+
 <h2><a shape="rect" name="ServletTransport-PublishinganendpointwiththeAPI"></a>Publishing
an endpoint with the API</h2>
 
 <p>Once your Servlet is registered in your web.xml, you should set the default bus
with CXFServlet's bus to make sure that CXF uses it as it's HTTP Transport. Simply publish
with the related path "Greeter" and your service should appear at the address you specify:</p>



Mime
View raw message