Author: buildbot
Date: Fri Nov 22 14:48:16 2013
New Revision: 887696
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 Fri Nov 22
14:48:16 2013
@@ -133,7 +133,7 @@ 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-MavenDependency">Maven
Dependency</a></li><li><a shape="rect"
href="#JAX-RSClientAPI-JAXRS2.0ClientAPI">JAX-RS 2.0 Client
API</a></li><ul><li><a shape="rect"
href="#JAX-RSClientAPI-Overview">Overview</a></li><li><a shape="rect"
href="#JAX-RSClientAPI-JAXRS2.0andCXFspecificAPI">JAX-RS 2.0 and CXF specific
API</a></li></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-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-SupportforarbitraryHTTPmethodsforsyncinvocations.">Support
for arbitrary HTTP methods for sync invocations.</a></li><li><a shape="rect"
href="#JAX-RSClientAPI-ThreadSafety">Thread Sa
fety</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-MavenDependency">Maven
Dependency</a></li><li><a shape="rect"
href="#JAX-RSClientAPI-JAXRS2.0ClientAPI">JAX-RS 2.0 Client
API</a></li><ul><li><a shape="rect"
href="#JAX-RSClientAPI-JAXRS2.0andCXFspecificAPI">JAX-RS 2.0 and CXF specific
API</a></li></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-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-SupportforarbitraryHTTPmethodsforsyncinvocations.">Support
for arbitrary HTTP methods for sync invocations.</a></li><li><a shape="rect"
href="#JAX-RSClientAPI-ThreadSafety">Thread Safety</a></li><li><a shape="rect"
href="#JAX-RSClientAPI-ConfiguringCli
entsatRuntime">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-MavenDependency"></a>Maven
Dependency</h1>
<p><dependency><br clear="none">
@@ -163,7 +163,34 @@ CXF Apache HttpClient based transport is
<p>CXF 3.0.0 implements JAX-RS 2.0 Client API. Internally it is implemented in
terms of CXF specific WebClient.</p>
-<h2><a shape="rect" name="JAX-RSClientAPI-Overview"></a>Overview</h2>
+<p>The <a shape="rect" class="external-link"
href="https://jax-rs-spec.java.net/nonav/2.0/apidocs/javax/ws/rs/client/package-frame.html"
rel="nofollow">javax.ws.rs.client</a> provides a short overview of how JAX-RS
2.0 Client API works.</p>
+
+<p>Typically, one starts from <a shape="rect" class="external-link"
href="https://jax-rs-spec.java.net/nonav/2.0/apidocs/javax/ws/rs/client/ClientBuilder.html"
rel="nofollow">ClientBuilder</a> in order to create a <a shape="rect"
class="external-link"
href="https://jax-rs-spec.java.net/nonav/2.0/apidocs/javax/ws/rs/client/Client.html"
rel="nofollow">Client</a>. <br clear="none">
+Next <a shape="rect" class="external-link"
href="https://jax-rs-spec.java.net/nonav/2.0/apidocs/javax/ws/rs/client/WebTarget.html"
rel="nofollow">WebTarget</a> is created and further customized as needed. </p>
+
+<p>Next, <a shape="rect" class="external-link"
href="https://jax-rs-spec.java.net/nonav/2.0/apidocs/javax/ws/rs/client/Invocation.Builder.html"
rel="nofollow">Invocation.Builder</a> is initialized and the request can be
made immediately using one of the <a shape="rect" class="external-link"
href="https://jax-rs-spec.java.net/nonav/2.0/apidocs/javax/ws/rs/client/SyncInvoker.html"
rel="nofollow">SyncInvoker</a> methods, with the builder directly implementing
SyncInvoker.</p>
+
+<div class="code panel" style="border-width: 1px;"><div class="codeContent
panelContent">
+<script class="theme: Default; brush: java; gutter: false"
type="syntaxhighlighter"><![CDATA[
+Client client = ClientBuilder.newBuilder().newClient();
+WebTarget target = client.target("http://localhost:8080/rs");
+target = target.path("service").queryParam("a", "avalue");
+
+Invocation.Builder builder = target.request();
+Response response = builder.get();
+Book book = builder.get(Book.class);
+
+]]></script>
+</div></div>
+
+<p>The above sequence can be easily collapsed into a single code sequence if
preferred.<br clear="none">
+Note that SyncInvoker (and AsyncInvoker) expects <a shape="rect"
class="external-link"
href="https://jax-rs-spec.java.net/nonav/2.0/apidocs/javax/ws/rs/client/Entity.html"
rel="nofollow">Entity</a> to represent the request body.</p>
+
+<p>Invocation.Builder has a shortcut to <a shape="rect" class="external-link"
href="https://jax-rs-spec.java.net/nonav/2.0/apidocs/javax/ws/rs/client/Invocation.html"
rel="nofollow">Invocation</a> via its build(...) methods to further customize
the invocation.</p>
+
+<p>Invocation.Builder.async() links to AsyncInvoker.</p>
+
+<p>Client and WebTarget are all can be individually configured, the implement
<a shape="rect" class="external-link"
href="https://jax-rs-spec.java.net/nonav/2.0/apidocs/javax/ws/rs/core/Configurable.html"
rel="nofollow">Configurable</a> interface which can accept the providers and
properties and return <a shape="rect" class="external-link"
href="https://jax-rs-spec.java.net/nonav/2.0/apidocs/javax/ws/rs/core/Configuration.html"
rel="nofollow">Configuration</a>. Configuring the Client directly or
indirectly via ClientBuilder.withConfig method affects all the WebClients
spawned by a given Client. </p>
<h2><a shape="rect"
name="JAX-RSClientAPI-JAXRS2.0andCXFspecificAPI"></a>JAX-RS 2.0 and CXF
specific API</h2>