cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From build...@apache.org
Subject svn commit: r859839 - in /websites/production/cxf/content: cache/docs.pageCache docs/jax-rs-client-api.html
Date Thu, 25 Apr 2013 09:48:05 GMT
Author: buildbot
Date: Thu Apr 25 09:48:05 2013
New Revision: 859839

Log:
Production update by buildbot for cxf

Modified:
    websites/production/cxf/content/cache/docs.pageCache
    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/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 Thu Apr 25 09:48:05 2013
@@ -254,7 +254,7 @@ BookStore proxy = JAXRSClientFactory.cre
 }
 </pre>
 </div></div>
-<p>javax.ws.rs.client.ClientException will be thrown if the exception has occurred
for one of two reasons: </p>
+<p>javax.ws.rs.ProcessingException 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>
 
 
@@ -431,6 +431,22 @@ value=<span class="code-quote">"http://s
 </pre>
 </div></div> 
 
+<p>Note, starting from CXF 2.7.5 it is possible to set-up WebClient instances the same
way as proxies, using jaxrs:client:</p>
+
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
+<pre class="code-xml">
+&lt;jaxrs:client id=<span class="code-quote">"webClient"</span>
+         address=<span class="code-quote">"https://localhost:${port}/services/rest"</span>
+         serviceClass=<span class="code-quote">"org.apache.cxf.jaxrs.client.WebClient"</span>&gt;
+         <span class="code-tag">&lt;jaxrs:headers&gt;</span>
+             <span class="code-tag">&lt;entry key=<span class="code-quote">"Accept"</span>
value=<span class="code-quote">"text/xml"</span>/&gt;</span>
+         <span class="code-tag">&lt;/jaxrs:headers&gt;</span>
+  <span class="code-tag">&lt;/jaxrs:client&gt;</span>
+</pre>
+</div></div>
+
+<p>The only limitation of using this option is that some of jaxrs:client attributes
("inheritHeaders", "modelRef") and elements ("model") are not really applicable to WebClient.</p>
+
 <h1><a shape="rect" name="JAX-RSClientAPI-XMLcentricclients"></a>XML-centric
clients</h1>
 
 <p>XML-centric clients are WebClients using an <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/ext/xml/XMLSource.java">XMLSource</a>
utility class. XMLSource has a number of methods facilitating the retrieval of JAXB beans,
individual properties or links with the help of XPath expressions. For example:</p>



Mime
View raw message