You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by bu...@apache.org on 2015/02/23 18:46:51 UTC

svn commit: r941207 - in /websites/production/cxf/content: cache/docs.pageCache docs/client-http-transport-including-ssl-support.html

Author: buildbot
Date: Mon Feb 23 17:46:50 2015
New Revision: 941207

Log:
Production update by buildbot for cxf

Modified:
    websites/production/cxf/content/cache/docs.pageCache
    websites/production/cxf/content/docs/client-http-transport-including-ssl-support.html

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

Modified: websites/production/cxf/content/docs/client-http-transport-including-ssl-support.html
==============================================================================
--- websites/production/cxf/content/docs/client-http-transport-including-ssl-support.html (original)
+++ websites/production/cxf/content/docs/client-http-transport-including-ssl-support.html Mon Feb 23 17:46:50 2015
@@ -118,11 +118,11 @@ Apache CXF -- Client HTTP Transport (inc
            <!-- Content -->
            <div class="wiki-content">
 <div id="ConfluenceContent"><p><style type="text/css">/*<![CDATA[*/
-div.rbtoc1419015876912 {padding: 0px;}
-div.rbtoc1419015876912 ul {list-style: disc;margin-left: 0px;}
-div.rbtoc1419015876912 li {margin-left: 0px;padding-left: 0px;}
+div.rbtoc1424713584777 {padding: 0px;}
+div.rbtoc1424713584777 ul {list-style: disc;margin-left: 0px;}
+div.rbtoc1424713584777 li {margin-left: 0px;padding-left: 0px;}
 
-/*]]>*/</style></p><div class="toc-macro rbtoc1419015876912">
+/*]]>*/</style></p><div class="toc-macro rbtoc1424713584777">
 <ul class="toc-indentation"><li><a shape="rect" href="#ClientHTTPTransport(includingSSLsupport)-Authentication">Authentication</a>
 <ul class="toc-indentation"><li><a shape="rect" href="#ClientHTTPTransport(includingSSLsupport)-BasicAuthentication">Basic Authentication</a></li><li><a shape="rect" href="#ClientHTTPTransport(includingSSLsupport)-DigestAuthentication">Digest Authentication</a></li><li><a shape="rect" href="#ClientHTTPTransport(includingSSLsupport)-Supplyingdynamicauthorization">Supplying dynamic authorization</a></li><li><a shape="rect" href="#ClientHTTPTransport(includingSSLsupport)-SpnegoAuthentication(Kerberos)">Spnego Authentication (Kerberos)</a>
 <ul class="toc-indentation"><li><a shape="rect" href="#ClientHTTPTransport(includingSSLsupport)-CredentialDelegation">Credential Delegation</a></li></ul>
@@ -137,7 +137,7 @@ div.rbtoc1419015876912 li {margin-left:
 </li><li><a shape="rect" href="#ClientHTTPTransport(includingSSLsupport)-Usingjavacode">Using java code</a>
 <ul class="toc-indentation"><li><a shape="rect" href="#ClientHTTPTransport(includingSSLsupport)-HowtoconfiguretheHTTPConduitfortheSOAPClient?">How to configure the HTTPConduit for the SOAP Client?</a></li><li><a shape="rect" href="#ClientHTTPTransport(includingSSLsupport)-Howtooverridetheserviceaddress?">How to override the service address ?</a></li></ul>
 </li><li><a shape="rect" href="#ClientHTTPTransport(includingSSLsupport)-ClientCacheControlDirectives">Client Cache Control Directives</a></li></ul>
-</li><li><a shape="rect" href="#ClientHTTPTransport(includingSSLsupport)-ANoteAboutChunking">A Note About Chunking</a></li><li><a shape="rect" href="#ClientHTTPTransport(includingSSLsupport)-AsynchronousHTTPConduit">Asynchronous HTTP Conduit</a></li></ul>
+</li><li><a shape="rect" href="#ClientHTTPTransport(includingSSLsupport)-ANoteAboutChunking">A Note About Chunking</a></li><li><a shape="rect" href="#ClientHTTPTransport(includingSSLsupport)-Whentosetcustomheaders">When to set custom headers</a></li><li><a shape="rect" href="#ClientHTTPTransport(includingSSLsupport)-AsynchronousHTTPConduit">Asynchronous HTTP Conduit</a></li></ul>
 </div><h1 id="ClientHTTPTransport(includingSSLsupport)-Authentication">Authentication</h1><h2 id="ClientHTTPTransport(includingSSLsupport)-BasicAuthentication">Basic Authentication</h2><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
 <script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[ &lt;conduit name=&quot;{http://example.com/}HelloWorldServicePort.http-conduit&quot;
    xmlns:sec=&quot;http://cxf.apache.org/configuration/security&quot;
@@ -372,7 +372,7 @@ http.setClient(httpClientPolicy);
    // Passing the SEI class that is generated by wsdl2java      
    ServicePort proxy = service.getPort(portName, SEI.class);
 ]]></script>
-</div></div><h2 id="ClientHTTPTransport(includingSSLsupport)-ClientCacheControlDirectives">Client Cache Control Directives</h2><p>The following table lists the cache control directives supported by an HTTP client.</p><div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"><p>Directive</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Behavior</p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>no-cache</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Caches cannot use a particular response to satisfy subsequent requests without first revalidating that response with the server. If specific response header fields are specified with this value, the restriction applies only to those header fields within the response. If no response header fields are specified, the restriction applies to the entire response.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>no-store</p></td
 ><td colspan="1" rowspan="1" class="confluenceTd"><p>Caches must not store any part of a response or any part of the request that invoked it.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>max-age</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The consumer can accept a response whose age is no greater than the specified time in seconds.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>max-stale</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The consumer can accept a response that has exceeded its expiration time. If a value is assigned to max-stale, it represents the number of seconds beyond the expiration time of a response up to which the consumer can still accept that response. If no value is assigned, it means the consumer can accept a stale response of any age.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>min-fresh</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The consumer 
 wants a response that will be still be fresh for at least the specified number of seconds indicated.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>no-transform</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Caches must not modify media type or location of the content in a response between a provider and a consumer.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>only-if-cached</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Caches should return only responses that are currently stored in the cache, and not responses that need to be reloaded or revalidated.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>cache-extension</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Specifies additional extensions to the other cache directives. Extensions might be informational or behavioral. An extended directive is specified in the context of a standard directive, so that applications not understa
 nding the extended directive can at least adhere to the behavior mandated by the standard directive.</p></td></tr></tbody></table></div><h1 id="ClientHTTPTransport(includingSSLsupport)-ANoteAboutChunking">A Note About Chunking</h1><p>There are two ways of putting a body into an HTTP stream:</p><ul><li>The "standard" way used by most browsers is to specify a Content-Length header in the HTTP headers. This allows the receiver to know how much data is coming and when to stop reading. The problem with this approach is that the length needs to be pre-determined. The data cannot be streamed as generated as the length needs to be calculated upfront. Thus, if chunking is turned off, we need to buffer the data in a byte buffer (or temp file if too large) so that the Content-Length can be calculated.</li><li>Chunked - with this mode, the data is sent to the receiver in chunks. Each chunk is preceded by a hexidecimal chunk size. When a chunk size is 0, the receiver knows all the data has been 
 received. This mode allows better streaming as we just need to buffer a small amount, up to 8K by default, and when the buffer fills, write out the chunk.</li></ul><p>In general, Chunked will perform better as the streaming can take place directly. HOWEVER, there are some problems with chunking:</p><ul><li>Many proxy servers don't understand it, especially older proxy servers. Many proxy servers want the Content-Length up front so they can allocate a buffer to store the request before passing it onto the real server.</li><li>Some of the older WebServices stacks also have problems with Chunking. Specifically, older versions of .NET.</li></ul><p>If you are getting strange errors (generally not soap faults, but other HTTP type errors) when trying to interact with a service, try turning off chunking to see if that helps.</p><h1 id="ClientHTTPTransport(includingSSLsupport)-AsynchronousHTTPConduit">Asynchronous HTTP Conduit</h1><p>Please see <a shape="rect" href="asynchronous-client-http-
 transport.html">Asynchronous HTTP Conduit</a> page for more information.</p></div>
+</div></div><h2 id="ClientHTTPTransport(includingSSLsupport)-ClientCacheControlDirectives">Client Cache Control Directives</h2><p>The following table lists the cache control directives supported by an HTTP client.</p><div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"><p>Directive</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Behavior</p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>no-cache</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Caches cannot use a particular response to satisfy subsequent requests without first revalidating that response with the server. If specific response header fields are specified with this value, the restriction applies only to those header fields within the response. If no response header fields are specified, the restriction applies to the entire response.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>no-store</p></td
 ><td colspan="1" rowspan="1" class="confluenceTd"><p>Caches must not store any part of a response or any part of the request that invoked it.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>max-age</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The consumer can accept a response whose age is no greater than the specified time in seconds.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>max-stale</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The consumer can accept a response that has exceeded its expiration time. If a value is assigned to max-stale, it represents the number of seconds beyond the expiration time of a response up to which the consumer can still accept that response. If no value is assigned, it means the consumer can accept a stale response of any age.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>min-fresh</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The consumer 
 wants a response that will be still be fresh for at least the specified number of seconds indicated.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>no-transform</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Caches must not modify media type or location of the content in a response between a provider and a consumer.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>only-if-cached</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Caches should return only responses that are currently stored in the cache, and not responses that need to be reloaded or revalidated.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>cache-extension</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Specifies additional extensions to the other cache directives. Extensions might be informational or behavioral. An extended directive is specified in the context of a standard directive, so that applications not understa
 nding the extended directive can at least adhere to the behavior mandated by the standard directive.</p></td></tr></tbody></table></div><h1 id="ClientHTTPTransport(includingSSLsupport)-ANoteAboutChunking">A Note About Chunking</h1><p>There are two ways of putting a body into an HTTP stream:</p><ul><li>The "standard" way used by most browsers is to specify a Content-Length header in the HTTP headers. This allows the receiver to know how much data is coming and when to stop reading. The problem with this approach is that the length needs to be pre-determined. The data cannot be streamed as generated as the length needs to be calculated upfront. Thus, if chunking is turned off, we need to buffer the data in a byte buffer (or temp file if too large) so that the Content-Length can be calculated.</li><li>Chunked - with this mode, the data is sent to the receiver in chunks. Each chunk is preceded by a hexidecimal chunk size. When a chunk size is 0, the receiver knows all the data has been 
 received. This mode allows better streaming as we just need to buffer a small amount, up to 8K by default, and when the buffer fills, write out the chunk.</li></ul><p>In general, Chunked will perform better as the streaming can take place directly. HOWEVER, there are some problems with chunking:</p><ul><li>Many proxy servers don't understand it, especially older proxy servers. Many proxy servers want the Content-Length up front so they can allocate a buffer to store the request before passing it onto the real server.</li><li>Some of the older WebServices stacks also have problems with Chunking. Specifically, older versions of .NET.</li></ul><p>If you are getting strange errors (generally not soap faults, but other HTTP type errors) when trying to interact with a service, try turning off chunking to see if that helps.</p><h1 id="ClientHTTPTransport(includingSSLsupport)-Whentosetcustomheaders">When to set custom headers</h1><p>&#160;</p><p>If you use a custom CXF interceptor to set on
 e or more outbound HTTP headers then it is recommended to get this interceptor running at a stage preceding the WRITE stage, before the outbound body is written out.</p><p>Otherwise the custom headers may get lost. The headers may get retained in some cases even if they are added after the body is written out, example, when a chunking threshold value (4K by default) has not been reached,</p><p>but relying on it for the headers not to be lost is brittle and should be avoided.</p><p>&#160;</p><h1 id="ClientHTTPTransport(includingSSLsupport)-AsynchronousHTTPConduit">Asynchronous HTTP Conduit</h1><p>Please see <a shape="rect" href="asynchronous-client-http-transport.html">Asynchronous HTTP Conduit</a> page for more information.</p></div>
            </div>
            <!-- Content -->
          </td>