axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject svn commit: r449964 - /webservices/axis2/trunk/java/xdocs/1_1/http-transport.html
Date Tue, 26 Sep 2006 09:44:21 GMT
Author: saminda
Date: Tue Sep 26 02:44:20 2006
New Revision: 449964



Modified: webservices/axis2/trunk/java/xdocs/1_1/http-transport.html
--- webservices/axis2/trunk/java/xdocs/1_1/http-transport.html (original)
+++ webservices/axis2/trunk/java/xdocs/1_1/http-transport.html Tue Sep 26 02:44:20 2006
@@ -25,37 +25,32 @@
   <li><a href="#timeout_config">Timeout Configuration</a></li>
   <li><a href="#version_config">HTTP Version Configuration</a></li>
-  <li><a href="#auth">Proxy and NTLM Authentication</a></li>
-  <li><a href="#preemptive_auth">Basic Authentication</a></li>
+  <li><a href="#auth">Proxy Authentication</a></li>
+  <li><a href="#preemptive_auth">Basic,Digest and NTLM Authentication</a></li>
 <a name="CommonsHTTPTransportSender"></a>
 <p>This is the default transport sender that is used in Server API as well as
-Client API. As the name implies it is based on commons-httpclient-3.0-rc3. In
+Client API. As the name implies it is based on commons-httpclient-3.0.1. In
 order to acquire the maximum flexibility, this sender has implemented POST
-interface and GET interface. GET interface is provided to help axis2 support
+interface and GET interface. GET and HTTP interfaces are also involved in axis2 REST support.</p>
-<p>Chunking support and KeepAlive support is also integrated via the
+<p>Chunking and KeepAlive support is also integrated via the
 facilities provided by commons-httpclient along with HTTP 1.1 support.</p>
 <p>&lt;transportSender/&gt; element is used to define transport senders in
 the axis2.xml as follows:</p>
 <pre>&lt;transportSender name="http" class="org.apache.axis2.transport.http.CommonsHTTPTransportSender"&gt;<br>
       &lt;parameter name="PROTOCOL" locked="false"&gt;HTTP/1.1&lt;/parameter&gt;<br>
       &lt;parameter name="Transfer-Encoding"&gt;chunked&lt;/parameter&gt;<br>&lt;/transportSender&gt;<br></pre>
-<p>Above code snippet shows the complete configuration of the transport
-sender. &lt;parameter/&gt; element introduces the additional parameters that
+<p>Above code snippet shows a simplest configuration of the transport
+sender for common use. &lt;parameter/&gt; element introduces the additional parameters
 should be compliant with the sender. HTTP PROTOCOL version sets as HTTP/1.0
 or HTTP/1.1. Default version is HTTP/1.1. It should be noted that chunking
-support is available only for HTTP/1.1. Thus, the user should be careful in
-setting the "chunked" property and use it only with version 1.1. KeepAlive
-property is default in version 1.1.</p>
-<p>These are the only parameters that are available from deployment. Other
-parameters such as character encoding style (UTF-8, UTF-16 etc) etc, are
-provided via MessageContext.</p>
+support is available only for HTTP/1.1. Thus, even if the user turn on "chunking", if the
HTTP version is 1.0, this setting will be ignored by the transport framework. KeepAlive property
is default in version 1.1.</p>
+<p>Some absolute properties are provided in runtime such as character encoding style
(UTF-8, UTF-16 etc) etc, are provided via MessageContext.</p>
 <a name="httpsupport"></a>
 <h3>HTTPS support</h3>
@@ -66,6 +61,7 @@
 <p>Please note that https works only when the server does not expect to
 authenticate the clients and where the server has the clients' public keys in
 its trust store.</p>
 <a name="timeout_config"></a>
 <h2>Timeout Configuration</h2>
@@ -84,8 +80,12 @@
 In runtime it's set as follows in the Stub. <source>
 Options options = new Options();
-options.setProperty(HTTPConstants.SO_TIMEOUT,new Integer(some_int_value));
-options.setProperty(HTTPConstants.CONNECTION_TIMEOUT,new Integer(some_int_value));
+options.setProperty(HTTPConstants.SO_TIMEOUT,new Integer(timeOutInMilliSeconds));
+options.setProperty(HTTPConstants.CONNECTION_TIMEOUT,new Integer(timeOutInMilliSeconds));
+// or
 </source><a name="version_config"></a>
@@ -103,12 +103,9 @@
 <a name="auth"></a>
-<h2>Proxy and NTLM Authentication</h2>
-<p>HttpClient support "Basic, Digest and NTLM" authentication schemes. These
-are used to authenticate with http servers and proxies.</p>
+<h2>Proxy Authentication</h2>
-<p>Axis2 uses deployment time and runtime mechanisms to authenticate proxies.
+<p>Commons-http client has the inbuilt ability to support proxy authentication. Axis2
uses deployment time and runtime mechanisms to authenticate proxies.
 In deployment time, user has to change the Axis2.xml as follows. This
 authentication will be available in http and https.</p>
 <pre>&lt;transportSender name="<b>http</b>" class="org.apache.axis2.transport.http.CommonsHTTPTransportSender"&gt;
@@ -137,6 +134,12 @@
 <p>The above code would eventually override the deployment proxy
 configuration settings.</p>
+<a name="preemptive_auth"></a>
+<h2>Basic,Digest and NTLM Authentication</h2>
+<p>HttpClient supports three different types of http authentication schemes: Basic,
Digest and NTLM. Based on the challenge provided by server httpclient automatically selects
the authentication scheme the request should be authenticated with. The most secure will be
NTLM and least secure will be Basic.</p>
 <p>NTLM is the most complex of the authentication protocols supported by
 HttpClient. It requires an instance of NTCredentials be available for the
 domain name of the server or the default credentials. Note that since NTLM
@@ -170,26 +173,22 @@
     used with HTTP 1.0 connections or servers that do not support HTTP
-<a name="preemptive_auth"></a>
-<h2>Basic Authentication</h2>
-<p>Axis2 uses httpclient's preemptive authentication scheme for Basic Authentication
- In this mode HttpClient will send the basic authentication response even before the 
- server gives an unauthorized response in certain situations, thus reducing the overhead

- of making the connection. Following code snippet shows how to configure Axis2 handle basic

- authentication using credentials such as username and password. In addition to this user
- include other credentials as well. Please refert to the API for more information. </p>
+<p>Axis2 also allows to add a custom Authentication Scheme to httpclient.</p>
+<p>The static inner bean Authenticator of HttpTransportProperties will hold the state
of the server to be authenticated with. Once filled it has to be set to the Options's property
bag with the key as HTTPConstants.AUTHENTICATE. Following code snippet shows the way of configuring
the transport framework to use Basic Authentication</p>
  Options options = new Options();
- HttpTransportProperties.BasicAuthentication
-                       basicAuthentication = new HttpTransportProperties().new
-                                                          BasicAuthentication();
-            basicAuthentication.setUsername("username");
-            basicAuthentication.setPassword("password");
+ HttpTransportProperties.Authenticator
+                       auth = new HttpTransportProperties.Authenticator();
+            auth.setUsername("username");
+            auth.setPassword("password");
+            // set if realm or domain is know
- options.setProperty(org.apache.axis2.transport.http.HTTPConstants.BASIC_AUTHENTICATION,basicAuthentication);
+ options.setProperty(org.apache.axis2.transport.http.HTTPConstants.BASIC_AUTHENTICATE,auth);

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message