cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From build...@apache.org
Subject svn commit: r833758 - in /websites/production/cxf/content: cache/docs.pageCache docs/27-migration-guide.html docs/jax-rs-basics.html docs/jax-rs-client-api.html
Date Tue, 02 Oct 2012 15:47:26 GMT
Author: buildbot
Date: Tue Oct  2 15:47:26 2012
New Revision: 833758

Log:
Production update by buildbot for cxf

Modified:
    websites/production/cxf/content/cache/docs.pageCache
    websites/production/cxf/content/docs/27-migration-guide.html
    websites/production/cxf/content/docs/jax-rs-basics.html
    websites/production/cxf/content/docs/jax-rs-client-api.html

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

Modified: websites/production/cxf/content/docs/27-migration-guide.html
==============================================================================
--- websites/production/cxf/content/docs/27-migration-guide.html (original)
+++ websites/production/cxf/content/docs/27-migration-guide.html Tue Oct  2 15:47:26 2012
@@ -125,8 +125,8 @@ Apache CXF -- 2.7 Migration Guide
 
 <ul><li>New <a shape="rect" href="udp-transport.html" title="UDP Transport">UDP
Transport</a>.</li><li>New optional <a shape="rect" href="asynchronous-client-http-transport.html"
title="Asynchronous Client HTTP Transport">HTTP transport</a> based on <a shape="rect"
class="external-link" href="http://hc.apache.org/httpcomponents-asyncclient-dev/index.html">Apache
HTTP Components HttpAsyncClient</a>.</li><li>Support for the <a shape="rect"
href="soap-over-udp.html" title="SOAP over UDP">SOAP over UDP</a>.</li><li>Ability
to only apply schema validation to incoming or outgoing messages by setting the "schema-validation-enabled"
property to "IN", "OUT", "BOTH", or "NONE".   @SchemaValidationEnabled annotation updated
to have a type=IN|OUT|BOTH|NONE parameter.</li><li>Support for <a shape="rect"
href="ws-discovery.html" title="WS-Discovery">WS-Discovery</a>.
 	<ul><li>Services can send Hello/Bye when started/stopped as well as respond
to Probe requests</li><li>API for sending probes and resolving to EndpointReferences</li></ul>
-	</li><li>Initial support for parts of the JAX-RS 2.0 specification
-	<ul><li>Additional methods on WebClient to provide asynchronous invocations</li></ul>
+	</li><li>Initial support for parts of the <a shape="rect" class="external-link"
href="http://jcp.org/en/jsr/detail?id=339" rel="nofollow">JAX-RS 2.0 (JSR-339)</a>
specification
+	<ul><li>Additional methods on WebClient to provide <a shape="rect" class="external-link"
href="https://cwiki.apache.org/confluence/display/CXF20DOC/JAX-RS+Client+API#JAX-RSClientAPI-Asynchronousinvocations">asynchronous
invocations</a></li><li>Support for new filters, interceptors, dynamic features,
exception classes, and more, please see <a shape="rect" href="jax-rs-basics.html" title="JAX-RS
Basics">JAX-RS Basics</a> for more information.</li></ul>
 	</li></ul>
 
 
@@ -139,7 +139,7 @@ Apache CXF -- 2.7 Migration Guide
 <ul><li>The WS-Addressing related VersionTransformer and MAPCodec classes have
been changed to not encode the WS-Addressing headers to  DOM elements and instead just use
the Header list on the SoapMessage directly.  This did change the parameters on the encode
methods to take the JAXBContext instead of the Marshaller.  Any custom VersionTransformers
will need to be updated.  (very rare)</li></ul>
 
 
-<ul><li>All methods that took or returned org.apache.cxf.feature.AbstractFeatures
have been changed to just use org.apache.cxf.feature.Feature.</li></ul>
+<ul><li>All methods that took or returned org.apache.cxf.feature.AbstractFeatures
have been changed to just use org.apache.cxf.feature.Feature.</li><li>JAX-RS:
3 classes have been removed from the org.apache.cxf.jaxrs.client package: ResponseReader,
ServerWebApplicationException, ClientWebApplicationException. The first class in the list
is not needed with JAX-RS 2.0 Response class, the latter two are replaced by javax.ws.rs.WebApplicationException
and javax.ws.rs.client.ClientException</li></ul>
 </div>
            </div>
            <!-- Content -->

Modified: websites/production/cxf/content/docs/jax-rs-basics.html
==============================================================================
--- websites/production/cxf/content/docs/jax-rs-basics.html (original)
+++ websites/production/cxf/content/docs/jax-rs-basics.html Tue Oct  2 15:47:26 2012
@@ -124,7 +124,23 @@ Apache CXF -- JAX-RS Basics
 <div id="ConfluenceContent"><p><span style="font-size:2em;font-weight:bold">
JAX-RS : Understanding the Basics </span></p>
 
 <div>
-<ul><li><a shape="rect" href="#JAX-RSBasics-Resourceclass">Resource class</a></li><li><a
shape="rect" href="#JAX-RSBasics-@Path">@Path</a></li><li><a shape="rect"
href="#JAX-RSBasics-HTTPMethod">HTTP Method</a></li><li><a shape="rect"
href="#JAX-RSBasics-Returntypes">Return types</a></li><li><a shape="rect"
href="#JAX-RSBasics-Exceptionhandling">Exception handling</a></li><li><a
shape="rect" href="#JAX-RSBasics-DealingwithParameters">Dealing with Parameters</a></li><ul><li><a
shape="rect" href="#JAX-RSBasics-Parameterbeans">Parameter beans</a></li></ul><li><a
shape="rect" href="#JAX-RSBasics-Resourcelifecycles">Resource lifecycles</a></li><li><a
shape="rect" href="#JAX-RSBasics-Overviewoftheselectionalgorithm.">Overview of the selection
algorithm.</a></li><ul><li><a shape="rect" href="#JAX-RSBasics-Selectingbetweenmultipleresourceclasses">Selecting
between multiple resource classes</a></li><li><a shape="rect" href="#JAX-RSBasics-Selectingbetweenmultipleresourcemethods">Selec
 ting between multiple resource methods</a></li><li><a shape="rect" href="#JAX-RSBasics-Resourcemethodsandmediatypes">Resource
methods and media types</a></li><li><a shape="rect" href="#JAX-RSBasics-Customselectionbetweenmultipleresources">Custom
selection between multiple resources</a></li></ul><li><a shape="rect"
href="#JAX-RSBasics-Contextannotations">Context annotations</a></li><ul><li><a
shape="rect" href="#JAX-RSBasics-CustomContexts">Custom Contexts</a></li></ul><li><a
shape="rect" href="#JAX-RSBasics-URIcalculationusingUriInfoandUriBuilder">URI calculation
using UriInfo and UriBuilder</a></li><li><a shape="rect" href="#JAX-RSBasics-Annotationinheritance">Annotation
inheritance</a></li><li><a shape="rect" href="#JAX-RSBasics-Subresourcelocators.">Sub-resource
locators.</a></li><ul><li><a shape="rect" href="#JAX-RSBasics-Staticresolutionofsubresources">Static
resolution of subresources</a></li></ul><li><a shape="rect" href="#JAX-RSBasics-MessageBodyProviders">Message
Bo
 dy Providers</a></li><ul><li><a shape="rect" href="#JAX-RSBasics-CustomMessageBodyProviders">Custom
Message Body Providers</a></li><li><a shape="rect" href="#JAX-RSBasics-Registeringcustomproviders">Registering
custom providers</a></li></ul><li><a shape="rect" href="#JAX-RSBasics-Customizingmediatypesformessagebodyproviders">Customizing
media types for message body providers</a></li><li><a shape="rect" href="#JAX-RSBasics-AdvancedHTTP">Advanced
HTTP</a></li></ul></div>
+<ul><li><a shape="rect" href="#JAX-RSBasics-WhatisNewinJAXRS2.0">What is
New in JAX-RS 2.0</a></li><ul><li><a shape="rect" href="#JAX-RSBasics-ClientAPI">Client
API</a></li><ul><li><a shape="rect" href="#JAX-RSBasics-AsynchronousAPI">Asynchronous
API</a></li><li><a shape="rect" href="#JAX-RSBasics-Responseinterfaceupdates">Response
interface updates</a></li></ul><li><a shape="rect" href="#JAX-RSBasics-Filters">Filters</a></li><li><a
shape="rect" href="#JAX-RSBasics-Interceptors">Interceptors</a></li><li><a
shape="rect" href="#JAX-RSBasics-DynamicFeatures">Dynamic Features</a></li><li><a
shape="rect" href="#JAX-RSBasics-Exceptions">Exceptions</a></li><li><a
shape="rect" href="#JAX-RSBasics-Suspendedinvocations">Suspended invocations</a></li><li><a
shape="rect" href="#JAX-RSBasics-Parameterconverters">Parameter converters</a></li><li><a
shape="rect" href="#JAX-RSBasics-Beanparameters">Bean parameters</a></li><li><a
shape="rect" href="#JAX-RSBasics-Updatestothematchingalgorithm
 ">Updates to the matching algorithm</a></li><li><a shape="rect" href="#JAX-RSBasics-Injectionintosubresources">Injection
into subresources</a></li></ul><li><a shape="rect" href="#JAX-RSBasics-Resourceclass">Resource
class</a></li><li><a shape="rect" href="#JAX-RSBasics-@Path">@Path</a></li><li><a
shape="rect" href="#JAX-RSBasics-HTTPMethod">HTTP Method</a></li><li><a
shape="rect" href="#JAX-RSBasics-Returntypes">Return types</a></li><li><a
shape="rect" href="#JAX-RSBasics-Exceptionhandling">Exception handling</a></li><ul><li><a
shape="rect" href="#JAX-RSBasics-CustomizingdefaultWebApplicationExceptionmapper">Customizing
default WebApplicationException mapper</a></li></ul><li><a shape="rect"
href="#JAX-RSBasics-DealingwithParameters">Dealing with Parameters</a></li><ul><li><a
shape="rect" href="#JAX-RSBasics-Parameterbeans">Parameter beans</a></li></ul><li><a
shape="rect" href="#JAX-RSBasics-Resourcelifecycles">Resource lifecycles</a></li><li><a
shape="rect" href="#JAX-RSBasi
 cs-Overviewoftheselectionalgorithm.">Overview of the selection algorithm.</a></li><ul><li><a
shape="rect" href="#JAX-RSBasics-Selectingbetweenmultipleresourceclasses">Selecting between
multiple resource classes</a></li><li><a shape="rect" href="#JAX-RSBasics-Selectingbetweenmultipleresourcemethods">Selecting
between multiple resource methods</a></li><li><a shape="rect" href="#JAX-RSBasics-Resourcemethodsandmediatypes">Resource
methods and media types</a></li><li><a shape="rect" href="#JAX-RSBasics-Customselectionbetweenmultipleresources">Custom
selection between multiple resources</a></li></ul><li><a shape="rect"
href="#JAX-RSBasics-Contextannotations">Context annotations</a></li><ul><li><a
shape="rect" href="#JAX-RSBasics-CustomContexts">Custom Contexts</a></li></ul><li><a
shape="rect" href="#JAX-RSBasics-URIcalculationusingUriInfoandUriBuilder">URI calculation
using UriInfo and UriBuilder</a></li><li><a shape="rect" href="#JAX-RSBasics-Annotationinheritance">Annotation
inh
 eritance</a></li><li><a shape="rect" href="#JAX-RSBasics-Subresourcelocators.">Sub-resource
locators.</a></li><ul><li><a shape="rect" href="#JAX-RSBasics-Staticresolutionofsubresources">Static
resolution of subresources</a></li></ul><li><a shape="rect" href="#JAX-RSBasics-MessageBodyProviders">Message
Body Providers</a></li><ul><li><a shape="rect" href="#JAX-RSBasics-CustomMessageBodyProviders">Custom
Message Body Providers</a></li><li><a shape="rect" href="#JAX-RSBasics-Registeringcustomproviders">Registering
custom providers</a></li></ul><li><a shape="rect" href="#JAX-RSBasics-Customizingmediatypesformessagebodyproviders">Customizing
media types for message body providers</a></li><li><a shape="rect" href="#JAX-RSBasics-AdvancedHTTP">Advanced
HTTP</a></li></ul></div>
+
+<h1><a shape="rect" name="JAX-RSBasics-WhatisNewinJAXRS2.0"></a>What is
New in JAX-RS 2.0</h1>
+
+<h2><a shape="rect" name="JAX-RSBasics-ClientAPI"></a>Client API</h2>
+<h3><a shape="rect" name="JAX-RSBasics-AsynchronousAPI"></a>Asynchronous
API</h3>
+<h3><a shape="rect" name="JAX-RSBasics-Responseinterfaceupdates"></a>Response
interface updates</h3>
+
+<h2><a shape="rect" name="JAX-RSBasics-Filters"></a>Filters</h2>
+<h2><a shape="rect" name="JAX-RSBasics-Interceptors"></a>Interceptors</h2>
+<h2><a shape="rect" name="JAX-RSBasics-DynamicFeatures"></a>Dynamic Features</h2>
+<h2><a shape="rect" name="JAX-RSBasics-Exceptions"></a>Exceptions</h2>
+<h2><a shape="rect" name="JAX-RSBasics-Suspendedinvocations"></a>Suspended
invocations</h2>
+<h2><a shape="rect" name="JAX-RSBasics-Parameterconverters"></a>Parameter
converters</h2>
+<h2><a shape="rect" name="JAX-RSBasics-Beanparameters"></a>Bean parameters</h2>
+<h2><a shape="rect" name="JAX-RSBasics-Updatestothematchingalgorithm"></a>Updates
to the matching algorithm</h2>
+<h2><a shape="rect" name="JAX-RSBasics-Injectionintosubresources"></a>Injection
into subresources</h2>
 
 <h1><a shape="rect" name="JAX-RSBasics-Resourceclass"></a>Resource class</h1>
 
@@ -312,6 +328,14 @@ The former option may be a better one wh
 
 <p>One can also register a custom CXF out fault interceptor which can handle all the
exceptions by writing directly to the HttpServletResponse stream or XMLStreamWriter (as XMLFaultOutInterceptor
does). For example, see this <a shape="rect" class="external-link" href="http://svn.apache.org/repos/asf/cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/CustomOutFaultInterceptor.java">test
interceptor</a>.</p>
 
+<h2><a shape="rect" name="JAX-RSBasics-CustomizingdefaultWebApplicationExceptionmapper"></a>Customizing
default WebApplicationException mapper</h2>
+
+<p>CXF ships a WebApplicationException mapper, org.apache.cxf.jaxrs.impl.WebApplicationExceptionMapper.
By default it logs a stack trace at a warning level and returns Response available in the
captured exception.<br clear="none">
+It can be configured to log a stack trace at a trace level, by setting a 'printStackTrace'
property to 'false'. Alternatively, if org.apache.cxf.logging.FaultListener is registered
(as a contextual property) and indicates that it handled a given exception, then no more logging
is done.</p>
+
+<p>A simple text error message can also be optionally reported, by setting an 'addMessageToResponse'
property to 'true'.<br clear="none">
+Note that the custom WebApplicationException mapper, if registered, will be preferred to
the default one.</p>
+
 <h1><a shape="rect" name="JAX-RSBasics-DealingwithParameters"></a>Dealing
with Parameters</h1>
 
 <p>PathParam annotation is used to map a given Path template variable to a method parameter.<br
clear="none">

Modified: websites/production/cxf/content/docs/jax-rs-client-api.html
==============================================================================
--- websites/production/cxf/content/docs/jax-rs-client-api.html (original)
+++ websites/production/cxf/content/docs/jax-rs-client-api.html Tue Oct  2 15:47:26 2012
@@ -124,7 +124,19 @@ Apache CXF -- JAX-RS Client API
 <div id="ConfluenceContent"><p><span style="font-size:2em;font-weight:bold">
JAX-RS : Client API </span></p>
 
 <div>
-<ul><li><a shape="rect" href="#JAX-RSClientAPI-ProxybasedAPI">Proxy-based
API</a></li><ul><li><a shape="rect" href="#JAX-RSClientAPI-Customizingproxies">Customizing
proxies</a></li><li><a shape="rect" href="#JAX-RSClientAPI-ConvertingproxiestoWebClientsandviceversa">Converting
proxies to Web Clients and vice versa</a></li><li><a shape="rect" href="#JAX-RSClientAPI-Handlingexceptions">Handling
exceptions</a></li><li><a shape="rect" href="#JAX-RSClientAPI-ConfiguringproxiesinSpring">Configuring
proxies in Spring</a></li><li><a shape="rect" href="#JAX-RSClientAPI-Injectingproxies">Injecting
proxies</a></li><li><a shape="rect" href="#JAX-RSClientAPI-Limitations">Limitations</a></li><li><a
shape="rect" href="#JAX-RSClientAPI-Workingwithusermodels">Working with user models</a></li></ul><li><a
shape="rect" href="#JAX-RSClientAPI-HTTPcentricclients">HTTP-centric clients</a></li><ul><li><a
shape="rect" href="#JAX-RSClientAPI-Workingwithexplicitcollections">Working with explicit
colle
 ctions</a></li><li><a shape="rect" href="#JAX-RSClientAPI-Handlingexceptions">Handling
exceptions</a></li><li><a shape="rect" href="#JAX-RSClientAPI-ConfiguringHTTPclientsinSpring">Configuring
HTTP clients in Spring</a></li></ul><li><a shape="rect" href="#JAX-RSClientAPI-XMLcentricclients">XML-centric
clients</a></li><li><a shape="rect" href="#JAX-RSClientAPI-ThreadSafety">Thread
Safety</a></li><li><a shape="rect" href="#JAX-RSClientAPI-ConfiguringClientsatRuntime">Configuring
Clients at Runtime</a></li><li><a shape="rect" href="#JAX-RSClientAPI-CreatingclientsprogrammaticallywithnoSpringdependencies">Creating
clients programmatically with no Spring dependencies</a></li><li><a shape="rect"
href="#JAX-RSClientAPI-ConfiguringanHTTPConduitfromSpring">Configuring an HTTP Conduit
from Spring</a></li><li><a shape="rect" href="#JAX-RSClientAPI-ClientsandAuthentication">Clients
and Authentication</a></li></ul></div>
+<ul><li><a shape="rect" href="#JAX-RSClientAPI-JAXRS2.0ClientAPI">JAX-RS
2.0 Client API</a></li><li><a shape="rect" href="#JAX-RSClientAPI-JAXRS2.0andCXFspecificAPI">JAX-RS
2.0 and CXF specific API</a></li><li><a shape="rect" href="#JAX-RSClientAPI-ProxybasedAPI">Proxy-based
API</a></li><ul><li><a shape="rect" href="#JAX-RSClientAPI-Customizingproxies">Customizing
proxies</a></li><li><a shape="rect" href="#JAX-RSClientAPI-ConvertingproxiestoWebClientsandviceversa">Converting
proxies to Web Clients and vice versa</a></li><li><a shape="rect" href="#JAX-RSClientAPI-Handlingexceptions">Handling
exceptions</a></li><li><a shape="rect" href="#JAX-RSClientAPI-ConfiguringproxiesinSpring">Configuring
proxies in Spring</a></li><li><a shape="rect" href="#JAX-RSClientAPI-Injectingproxies">Injecting
proxies</a></li><li><a shape="rect" href="#JAX-RSClientAPI-Limitations">Limitations</a></li><li><a
shape="rect" href="#JAX-RSClientAPI-Workingwithusermodels">Working with user models</a></li><
 /ul><li><a shape="rect" href="#JAX-RSClientAPI-CXFWebClientAPI">CXF WebClient
API</a></li><ul><li><a shape="rect" href="#JAX-RSClientAPI-Asynchronousinvocations">Asynchronous
invocations</a></li><li><a shape="rect" href="#JAX-RSClientAPI-Workingwithexplicitcollections">Working
with explicit collections</a></li><li><a shape="rect" href="#JAX-RSClientAPI-Handlingexceptions">Handling
exceptions</a></li><li><a shape="rect" href="#JAX-RSClientAPI-ConfiguringHTTPclientsinSpring">Configuring
HTTP clients in Spring</a></li></ul><li><a shape="rect" href="#JAX-RSClientAPI-XMLcentricclients">XML-centric
clients</a></li><li><a shape="rect" href="#JAX-RSClientAPI-ThreadSafety">Thread
Safety</a></li><li><a shape="rect" href="#JAX-RSClientAPI-ConfiguringClientsatRuntime">Configuring
Clients at Runtime</a></li><li><a shape="rect" href="#JAX-RSClientAPI-CreatingclientsprogrammaticallywithnoSpringdependencies">Creating
clients programmatically with no Spring dependencies</a></li><li><a shape=
 "rect" href="#JAX-RSClientAPI-ConfiguringanHTTPConduitfromSpring">Configuring an HTTP
Conduit from Spring</a></li><li><a shape="rect" href="#JAX-RSClientAPI-ClientsandAuthentication">Clients
and Authentication</a></li></ul></div>
+<h1><a shape="rect" name="JAX-RSClientAPI-JAXRS2.0ClientAPI"></a>JAX-RS
2.0 Client API</h1>
+
+<p>To be supported</p>
+
+<h1><a shape="rect" name="JAX-RSClientAPI-JAXRS2.0andCXFspecificAPI"></a>JAX-RS
2.0 and CXF specific API</h1>
+
+<p>CXF proxy and WebClient client code has been retrofitted to support all the new
JAX-RS 2.0 client constructs except for the client API itself.<br clear="none">
+Specifically, JAX-RS 2.0 client filters, reader and writer interceptors, new exception classes
and Response API all can be used in scope of working with proxy or WebClient API.</p>
+
+<p>Additionally, WebClient supports JAX-RS 2.0 AsyncInvoker interface and offers few
shortcuts, please see more about it below.</p>
+
+<p>Users can expect WebClient API maintained in the next CXF releases as it offers
a light-weight fluent API alternative.</p>
 
 <h1><a shape="rect" name="JAX-RSClientAPI-ProxybasedAPI"></a>Proxy-based
API</h1>
 
@@ -229,24 +241,25 @@ BookStore proxy2 = JAXRSClientFactory.fr
 <p>There are a couple of ways you can handle remote exceptions with proxies.<br
clear="none">
 One approach is to register a <a shape="rect" class="external-link" href="http://svn.apache.org/repos/asf/cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/client/ResponseExceptionMapper.java">ResponseExceptionMapper</a>
as a provider either from Spring using a jaxrs:client or using a corresponding JAXRSClientFactory
utility method. This way you can map remote error codes to expected checked exceptions or
runtime exceptions if needed.</p>
 
-<p>If no ResponseExceptionMapper is available when a remote invocation failed then
an org.apache.cxf.jaxrs.client.ServerWebApplicationException (which is an instance of JAX-RS
WebApplication) will be thrown. At this point of time you can check the actual Response and
proceed from there:</p>
+<p>If no ResponseExceptionMapper is available when a remote invocation failed then
an instance of javax.ws.rs.WebApplicationException will be thrown (Note org.apache.cxf.jaxrs.client.ServerWebApplicationException
is used to represent the server exceptions before CXF 2.7.0.). At this point of time you can
check the actual Response and proceed from there:</p>
 
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
 <pre class="code-java">
 BookStore proxy = JAXRSClientFactory.create(<span class="code-quote">"http:<span
class="code-comment">//books"</span>, BookStore.class);
 </span><span class="code-keyword">try</span> {
     proxy.getBook();
-} <span class="code-keyword">catch</span>(ServerWebApplicationException ex) {
+} <span class="code-keyword">catch</span>(WebApplicationException ex) {
   Response r = ex.getResponse();
   <span class="code-object">String</span> message = ex.getMessage();
 }
 </pre>
 </div></div>
-
-<p>org.apache.cxf.jaxrs.client.ClientWebApplicationException will be thrown if the
exception has occurred for one of two reasons: </p>
+<p>javax.ws.rs.client.ClientException will be thrown if the exception has occurred
for one of two reasons: </p>
 <ul class="alternate" type="square"><li>the remote invocation succeeded but no
proper MessageBodyReader has been found on the client side; in this case the Response object
representing the result of the invocation will still be available</li><li>the
remote invocation has failed for whatever reasons on the client side, example, no MessageBodyWriter
is available.</li></ul>
 
 
+<p>Note org.apache.cxf.jaxrs.client.ClientWebApplicationException is used to represent
the client processing exceptions before CXF 2.7.0.</p>
+
 <h2><a shape="rect" name="JAX-RSClientAPI-ConfiguringproxiesinSpring"></a>Configuring
proxies in Spring</h2>
 
 <p>When creating a proxy with JAXRSClientFactory, you can pass a Spring configuration
location as one of the arguments. Or you can create a default bus using Spring configuration
and all proxies will pick it up:</p>
@@ -283,6 +296,8 @@ BusFactory.setDefaultBus(bus);
 
 <p>Proxy sub-resource methods returning Objects can not be invoked. Prefer to have
sub-resource methods returning typed classes: interfaces, abstract classes or concrete implementations.
</p>
 
+<p><b>The following applies to CXF 2.6.x-2.4.x only</b>:</p>
+
 <p>When a proxy method returning a JAX-RS Response is invoked, the returned Response.getEntity()
will return a response InputStream by default. Starting with CXF 2.3.2 one can register an
org.apache.cxf.jaxrs.client.ResponseReader provider and cast the Response.getEntity() to more
specific application classes:</p>
 
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
@@ -313,7 +328,7 @@ JAXRSClientFactory.createFromModel(<span
 
 <p>BookNoAnnotations is either an interface or concrete class with no JAX-RS annotations.
Both client proxies and server endpoints can 'turn' it into a RESTful resource by applying
an external user model.</p>
 
-<h1><a shape="rect" name="JAX-RSClientAPI-HTTPcentricclients"></a>HTTP-centric
clients</h1>
+<h1><a shape="rect" name="JAX-RSClientAPI-CXFWebClientAPI"></a>CXF WebClient
API</h1>
 
 <p>HTTP centric clients are <a shape="rect" class="external-link" href="http://svn.apache.org/repos/asf/cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/client/WebClient.java">WebClient</a>
instances which also implement the <a shape="rect" class="external-link" href="http://svn.apache.org/repos/asf/cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/client/Client.java">Client</a>
interface. In addition to setting various Client request properties, you can also make an
explicit HTTP invocation with an HTTP verb being the name of a given operation :</p>
 
@@ -332,13 +347,10 @@ WebClient client = WebClient.create(<spa
 </span>client.path(<span class="code-quote">"bookstore/books"</span>);
 client.type(<span class="code-quote">"text/xml"</span>).accept(<span class="code-quote">"text/xml"</span>)
 Response r = client.post(<span class="code-keyword">new</span> Book());
-InputStream is = (InputStream)r.getEntity();
-Book b = getFromInputStreamUsingJaxb(is);
+Book b = r.readEntity(Book.class);
 </pre>
 </div></div>
 
-<p>org.apache.cxf.jaxrs.client.ResponseReader can be registered to make it possible
to cast Response.getEntity() to specific types.</p>
-
 <p>WebClient lets you get back to a base URI or to a previous path segment and move
forward, it can be handy for getting a number of individual entries from a service with ids
embedded in path segments :</p>
 
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
@@ -372,6 +384,10 @@ Book book = WebClient.create(<span class
 
 <p>When reusing the same WebClient instance for multiple invocations, one may want
to reset its state with the help of the reset() method, for example, when the Accept header
value needs to be changed and the current URI needs to be reset to the baseURI (as an alternative
to a back(true) call). The resetQuery() method may be used to reset the query values only.
Both options are available for proxies too.</p>
 
+<h2><a shape="rect" name="JAX-RSClientAPI-Asynchronousinvocations"></a>Asynchronous
invocations</h2>
+
+<p><b>Starting from CXF 2.7.0</b></p>
+
 <h2><a shape="rect" name="JAX-RSClientAPI-Workingwithexplicitcollections"></a>Working
with explicit collections</h2>
 
 <p>Example :</p>
@@ -388,7 +404,7 @@ Collection&lt;? <span class="code-keywor
 <h2><a shape="rect" name="JAX-RSClientAPI-Handlingexceptions"></a>Handling
exceptions</h2>
 
 
-<p>You can handle remote exceptions by either explicitly getting a Response object
as shown above and handling error statuses as needed or you can catch either ServerWebApplicationException
or ClientWebApplicationException exceptions, the same way it can be done with proxies. </p>
+<p>You can handle remote exceptions by either explicitly getting a Response object
as shown above and handling error statuses as needed or you can catch either javax.ws.rs.WebApplicationException
or javax.ws.rs.client.ClientException exceptions, the same way it can be done with proxies.
</p>
 
 <h2><a shape="rect" name="JAX-RSClientAPI-ConfiguringHTTPclientsinSpring"></a>Configuring
HTTP clients in Spring</h2>
 



Mime
View raw message