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 64ACFDDF7 for ; Tue, 2 Oct 2012 14:48:12 +0000 (UTC) Received: (qmail 10195 invoked by uid 500); 2 Oct 2012 14:48:12 -0000 Delivered-To: apmail-cxf-commits-archive@cxf.apache.org Received: (qmail 10157 invoked by uid 500); 2 Oct 2012 14:48:12 -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 10147 invoked by uid 99); 2 Oct 2012 14:48:12 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 02 Oct 2012 14:48:12 +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; Tue, 02 Oct 2012 14:48:09 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 4BF1B23888E4 for ; Tue, 2 Oct 2012 14:47:26 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r833754 - in /websites/production/cxf/content: cache/docs.pageCache docs/jax-rs.html Date: Tue, 02 Oct 2012 14:47:26 -0000 To: commits@cxf.apache.org From: buildbot@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20121002144726.4BF1B23888E4@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: buildbot Date: Tue Oct 2 14:47:25 2012 New Revision: 833754 Log: Production update by buildbot for cxf Modified: websites/production/cxf/content/cache/docs.pageCache websites/production/cxf/content/docs/jax-rs.html Modified: websites/production/cxf/content/cache/docs.pageCache ============================================================================== Binary files - no diff available. Modified: websites/production/cxf/content/docs/jax-rs.html ============================================================================== --- websites/production/cxf/content/docs/jax-rs.html (original) +++ websites/production/cxf/content/docs/jax-rs.html Tue Oct 2 14:47:25 2012 @@ -125,15 +125,15 @@ Apache CXF -- JAX-RS +

Introduction

JAX-RS: Java API for RESTful Web Services is a Java programming language API that provides support in creating web services according to the Representational State Transfer (REST) architectural style.

-

CXF supports the Java API for RESTful Web Services: JAX-RS 1.1 (JSR-311) and JAX-RS 2.0 (JSR-339).

+

CXF supports the Java API for RESTful Web Services: JAX-RS 2.0 (JSR-339) and JAX-RS 1.1 (JSR-311).

-

CXF 2.7.0 supports JAX-RS 2.0 (server side only, client API to be supported later).

+

CXF 2.7.0 supports most of the new features introduced in JAX-RS 2.0 (excluding the client API for now - but note that CXF client API has been retrofitted to support new filters, interceptors, exception classes and Response API, plus the asynchronous client invoker API).

CXF 2.6.x, 2.5.x, 2.4.x and 2.3.x supports JSR-311 API 1.1 and is JAX-RS TCK 1.1 compliant.
The JAX-RS 1.1 specification may be found here

@@ -145,7 +145,7 @@ The JAX-RS 1.0 specification may be foun

JAX-RS related demos are located under the samples/jax_rs directory.

-

This documentation will refer to JSR-311 API 1.1.

+

This documentation will refer to JAX-RS 2.0 (JSR-339) API.

Outstanding JAX-RS JIRA issues can be found here.

@@ -155,7 +155,9 @@ The JAX-RS 1.0 specification may be foun

Migrating from JAX-RS 1.1 to 2.0

-

//TODO

+

JAX-RS 2.0 is backward compatible with JAX-RS 1.1. Please see JAX-RS Basics for more information.

+ +

The following CXF specific classes are not available in CXF 2.7.0: org.apache.cxf.jaxrs.client.ResponseReader, org.apache.cxf.jaxrs.client.ServerWebApplicationException, org.apache.cxf.jaxrs.client.ClientWebApplicationException

Migrating from JAX-RS 1.0 to 1.1

@@ -166,122 +168,112 @@ There have been just a few minor modific

Maven dependencies

-

CXF 2.7.0

- -

CXF 2.3.x - CXF 2.6.x

+

The cxf-rt-frontend-jaxrs dependency is required:

    <dependency>
       <groupId>org.apache.cxf</groupId>
       <artifactId>cxf-rt-frontend-jaxrs</artifactId>
-      <version>2.6.0</version>
+      <version>${cxf.version}</version>
    </dependency>
 
-

This will in turn pull in other CXF modules such cxf-api, cxf-rt-core, cxf-rt-transports-http and cxf-rt-bindings-xml as well as the following 3rd-party dependencies:

+

This will in turn pull in other CXF modules such cxf-api, cxf-rt-core, cxf-rt-transports-http and cxf-rt-bindings-xml as well as the following 3rd-party dependencies.

-

1. javax.ws.rs/jsr311-api/1.1.1 (or 1.0 for CXF 2.2.x)

+

Here is a list of the additional dependencies:

-

2. org.apache.abdera groupId: abdera-core, abdera-parser and abdera-extensions-json artifacts, version 1.1. Note that starting from CXF 2.3.0 the Abdera dependencies are optional.

+

CXF 2.7.0

-

3. org.springframework/spring-core/3.0.5-RELEASE (and other core Spring dependencies)

+

javax.ws.rs/javax.ws.rs-api/m10 replaces javax.ws.rs/jsr311-api/1.1.1. This is very close to JSR-339 Public Release API level. Users can expect very minor differences in the Final Release of API.

-

4. org.codehaus.jettison/jettison/1.3

+

CXF 2.6.x

-

Note that starting from CXF 2.3.2 and 2.4.0 the cxf-rt-databindings-aegis and org.apache.xmlbeans/xmlbeans/2.4.0 dependencies are optional. If you are not working with the CXF distributions containing these dependencies but using Maven to pull in either the CXF JAX-RS Bundle or the cxf-rt-frontend-jaxrs frontend then please make sure one of the following dependencies are also included:

+

Please check the CXF 2.6 Migration Guide for the information about all the changes affecting the JAX-RS users. Typically adding the frontend jaxrs dependency should be enough.

+ +

1. javax.ws.rs/jsr311-api/1.1.1

+ +

Optional providers (including the default JSONProvider) are located in this module:

    <dependency>
       <groupId>org.apache.cxf</groupId>
-      <artifactId>cxf-rt-databinding-aegis</artifactId>
-      <!-- 2.4.4 or 2.5.0 -->
-      <version>${cxf.version}</version>
-   </dependency>
-   <dependency>
-      <groupId>org.apache.xmlbeans</groupId>
-      <artifactId>xmlbeans</artifactId>
-      <version>2.4.0</version>
+      <artifactId>cxf-rt-rs-extension-providers</artifactId>
+      <version>2.6.0</version>
    </dependency>
 
-

Starting from CXF 2.4.0 the wsdl4j transitive dependency is only required for running the CXF JAX-RS client code due to one of the HTTP transport extensions indirectly depending on wsdl4j. When running the server endpoints only, you can add the wsdl4j exclusion to either cxf-frontend-jaxrs or cxf-bundle-jaxrs dependency:

- -
-
-<exclusion>
- <groupId>wsdl4j</groupId>
- <artifactId>wsdl4j</artifactId>
-</exclusion>
-
-
- -

Please check the pom.xml for the list of cxf components used by the JAX-RS implementation. Snapshots are available from http://repository.apache.org/snapshots/org/apache/cxf/apache-cxf/.

- -

CXF 2.6.x

- -

Please check the CXF 2.6 Migration Guide for the information about all the changes affecting the JAX-RS users. Typically the frontend dependency should be enough:

+

The Search extension is now located in

    <dependency>
       <groupId>org.apache.cxf</groupId>
-      <artifactId>cxf-rt-frontend-jaxrs</artifactId>
+      <artifactId>cxf-rt-rs-extension-search</artifactId>
       <version>2.6.0</version>
    </dependency>
 
-

Optional providers (including the default JSONProvider) are located in this module:

+

CXF 2.5.x - CXF 2.3.x

+ +

1. javax.ws.rs/jsr311-api/1.1.1

+ +

2. org.apache.abdera groupId: abdera-core, abdera-parser and abdera-extensions-json artifacts, version 1.1. Note that starting from CXF 2.3.0 the Abdera dependencies are optional.

+ +

3. org.springframework/spring-core/3.0.5-RELEASE (and other core Spring dependencies)

+ +

4. org.codehaus.jettison/jettison/1.3.2

+ +

Note that starting from CXF 2.4.x the cxf-rt-databindings-aegis and org.apache.xmlbeans/xmlbeans/2.4.0 dependencies are optional. If you are not working with the CXF distributions containing these dependencies but using Maven to pull in either the CXF JAX-RS Bundle or the cxf-rt-frontend-jaxrs frontend then please make sure one of the following dependencies are also included:

    <dependency>
       <groupId>org.apache.cxf</groupId>
-      <artifactId>cxf-rt-rs-extension-providers</artifactId>
-      <version>2.6.0</version>
+      <artifactId>cxf-rt-databinding-aegis</artifactId>
+      <!-- 2.4.4 or 2.5.0 -->
+      <version>${cxf.version}</version>
+   </dependency>
+   <dependency>
+      <groupId>org.apache.xmlbeans</groupId>
+      <artifactId>xmlbeans</artifactId>
+      <version>2.4.0</version>
    </dependency>
 
-

The Search extension is now located in

+

Starting from CXF 2.4.0 the wsdl4j transitive dependency is only required for running the CXF JAX-RS client code due to one of the HTTP transport extensions indirectly depending on wsdl4j. When running the server endpoints only, you can add the wsdl4j exclusion to either cxf-frontend-jaxrs or cxf-bundle-jaxrs dependency:

-   <dependency>
-      <groupId>org.apache.cxf</groupId>
-      <artifactId>cxf-rt-rs-extension-search</artifactId>
-      <version>2.6.0</version>
-   </dependency>
+<exclusion>
+ <groupId>wsdl4j</groupId>
+ <artifactId>wsdl4j</artifactId>
+</exclusion>
 
- +

Please check the pom.xml for the list of cxf components used by the JAX-RS implementation. Snapshots are available from http://repository.apache.org/snapshots/org/apache/cxf/apache-cxf/.

Setting up the classpath

If Maven is not used then the following JARs will need to be available at the runtime classpath.

-

For CXF 2.4.4:

+

For CXF 2.7.x:

-
  • cxf-2.4.4.jar
  • jsr311-api-1.1.1.jar
  • jaxb-impl-2.1.13.jar
  • jaxb-api-2.1.jar
+

TODO

+

For CXF 2.6.x:

-
  • geronimo-annotation_1.0_spec-1.1.1.jar
  • geronimo-activation_1.1_spec-1.1.jar
  • geronimo-servlet_3.0_spec_1.0.jar
  • commons-logging-1.1.1.jar
+

TODO

+

For CXF 2.5.x-2.4.x:

-
  • geronimo-stax_api_1.0_spec-1.0.1.jar
  • woodstox-core-asl-4.0.8.jar
  • stax2-api-3.0.1.jar
- - -
  • wsdl4j-1.6.2.jar (only needed at the client side)
  • xmlschema-core-2.0.jar
  • neethi-3.0.0.jar
- - -

For CXF 2.3.7:

- -
  • cxf-2.3.7.jar
  • jsr311-api-1.1.1.jar
  • jaxb-impl-2.1.13.jar
  • jaxb-api-2.1.jar
+
  • cxf-2.4.4.jar
  • jsr311-api-1.1.1.jar
  • jaxb-impl-2.1.13.jar
  • jaxb-api-2.1.jar
  • geronimo-annotation_1.0_spec-1.1.1.jar
  • geronimo-activation_1.1_spec-1.1.jar
  • geronimo-servlet_3.0_spec_1.0.jar
  • commons-logging-1.1.1.jar
@@ -290,14 +282,9 @@ There have been just a few minor modific
  • geronimo-stax_api_1.0_spec-1.0.1.jar
  • woodstox-core-asl-4.0.8.jar
  • stax2-api-3.0.1.jar
-
  • wsdl4j-1.6.2.jar
  • XmlSchema-1.4.5.jar
  • neethi-2.0.4.jar
- - +
  • wsdl4j-1.6.2.jar (only needed at the client side)
  • xmlschema-core-2.0.jar
  • neethi-3.0.0.jar
-

If Spring configuration is used then add spring.jar from the Spring distribution or the spring jars available in the CXF distribution. When creating client proxies from concrete classes the cglib-nodep-2.1_3.jar needs to be added. You do not need to add JAXB libraries if you do not use JAXB. If you depend on Jetty then you will also need to add Jetty 7 or Jetty 6 JARs shipped with CXF.

-

We are working on reducing the set of required dependencies.
-Please see the configuration sections below on how the spring dependency can be dropped.

CXF JAX-RS bundle

@@ -310,7 +297,6 @@ Please see the configuration sections be <dependency> <groupId>org.apache.cxf</groupId> <artifactId>cxf-bundle-jaxrs</artifactId> - <!-- 2.3.7 or 2.4.4 or 2.5.0 --> <version>${cxf.version}</version> <exclusions> <exclusion> @@ -325,14 +311,14 @@ Please see the configuration sections be

What is New

-
  • Initial support for MAC token in OAuth2, please see JAX-RS OAuth2 for more information.
  • Kerberos Support, please see JAXRS Kerberos for more information.
+
  • Initial support for JAX-RS 2.0, please see JAX-RS Basics for more information
  • Initial support for MAC token in OAuth2, please see JAX-RS OAuth2 for more information.
  • Kerberos Support, please see JAXRS Kerberos for more information.

Getting Started with JAX-RS

Understanding the Basics

-

You are encouraged to read JAX-RS spec (html version) to find out information not covered by this documentation. The specification introduces many terms such as root resources, resource methods, sub-resources and sub-resource locators, message body readers and writers.

+

You are encouraged to read JSR-339 specification to find out information not covered by this documentation. The specification introduces many terms such as root resources, resource methods, sub-resources and sub-resource locators, message body readers and writers. JAX-RS 2.0 additionally introduces filters, interceptors, new client API, features, new exception classes, server-side support for asynchronous invocations.

Please see the JAX-RS Basics page for more information.