Return-Path: X-Original-To: apmail-cxf-commits-archive@www.apache.org Delivered-To: apmail-cxf-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 1A56610883 for ; Fri, 2 May 2014 12:47:24 +0000 (UTC) Received: (qmail 84086 invoked by uid 500); 2 May 2014 12:47:22 -0000 Delivered-To: apmail-cxf-commits-archive@cxf.apache.org Received: (qmail 84000 invoked by uid 500); 2 May 2014 12:47:20 -0000 Mailing-List: contact commits-help@cxf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cxf.apache.org Delivered-To: mailing list commits@cxf.apache.org Received: (qmail 83984 invoked by uid 99); 2 May 2014 12:47:18 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 02 May 2014 12:47:18 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 02 May 2014 12:47:17 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id BAED92388A3B for ; Fri, 2 May 2014 12:46:53 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r907765 - in /websites/production/cxf/content: cache/docs.pageCache docs/jax-rs-data-bindings.html Date: Fri, 02 May 2014 12:46:53 -0000 To: commits@cxf.apache.org From: buildbot@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20140502124653.BAED92388A3B@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: buildbot Date: Fri May 2 12:46:53 2014 New Revision: 907765 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 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 May 2 12:46:53 2014 @@ -119,11 +119,11 @@ Apache CXF -- JAX-RS Data Bindings

 

 

 

JAX-RS : Data Bindings

 

 

 

+/*]]>*/

JAXB support

The request and response can be marshalled and unmarshalled to/from Java object using JAXB.

There's a number of ways to tell to the JAXB provider how objects can be serialized. The simplest way is to mark a given type with @XmlRootElement annotation.

For example:

@@ -403,7 +403,33 @@ class="org.apache.cxf.jaxrs.provide ]]> -

JSON With Padding (JSONP)

One option for supporting "JSON With Padding" (JSONP) is to extend the default JSONProvider and override its writeTo method as follows:

+

JSR-353 JSON Processing

As per JAX-RS 2.0 specification, the support of JSR-353 Java API for JSON Processing is mandatory requirement and implies the presence of message body reader(s)/writer(s) for following types: JsonStructure, JsonArray and JsonObject. The Apache CXF provides such a support in a form of JsrJsonpProvider provider distributed by Apache CXF JAX-RS Extensions Providers module (cxf-rt-rs-extension-pro viders).

+ +

Adding JsrJsonpProvider provider alone (or in a combination with other providers) allows JAX-RS resources to natively use JsonStructure, JsonArray, JsonObject as input parameters or return values. For example:

+ +

The JsrJsonpProvider provider could be used on server side or on a client side. By default, the provider uses JSR-353 Java API for JSON Processing reference implementation to read/write message bodies.

JSON With Padding (JSONP)

One option for supporting "JSON With Padding" (JSONP) is to extend the default JSONProvider and override its writeTo method as follows: