| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> |
| <html> |
| <head> |
| <meta http-equiv="content-type" content=""> |
| <title>HTTP transports</title> |
| </head> |
| |
| <body lang="en"> |
| <h1><a name="#configTransport">HTTP transports</a></h1> |
| |
| <h3>CommonsHTTPTransportSender</h3> |
| |
| <p>This is the default transport sender that is used in Server API as |
| well as Client API and as the name implies its based on |
| commons-httpclient-3.0-rc3. In order to acquire the maximum flexibility, this |
| sender has implemented POST interface and GET interface. GET interface is provided |
| to help axis2 in supporting REST</p> |
| |
| <p>Chunking support and KeepAlive support also integrated via the facilities |
| provided by commons-httpclient along with HTTP 1.1 support. |
| </p> |
| |
| <p><transportSender/> element is used to define transport senders in the |
| axis2.xml as follows: </p> |
| <code> |
| <pre><transportSender name="http" class="org.apache.axis2.transport.http.CommonsHTTPTransportSender"><br> <parameter name="PROTOCOL" locked="xsd:false">HTTP/1.1</parameter><br> <parameter name="Transfer-Encoding">chunked</parameter><br></transportSender><br></pre> |
| </code> |
| |
| <p>Above code snippet shows the complete configuration of the transport |
| sender. <parameter/> element introduces the additional parameters that |
| 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, to use it only with version 1.1. KeepAlive property |
| is default in version 1.1. </p> |
| |
| <p>These are the only parameters that is available from deployment. Other |
| parameters such as character encoding style etc, are provided via |
| MessageContext.</p> |
| |
| <h4>HTTPS support</h4> |
| It should be noted that CommonsHTTPTransportSender can be used to communicate |
| over https. |
| <code> |
| <pre><transportSender name="<b>https</b>" class="org.apache.axis2.transport.http.CommonsHTTPTransportSender"><br> <parameter name="PROTOCOL" locked="xsd:false">HTTP/1.1</parameter><br> <parameter name="Transfer-Encoding">chunked</parameter><br></transportSender><br></pre> |
| </code> |
| |
| Please note that https only works when the server does not expect to |
| authenticate the clients where the server has the clients' public keys |
| in the its trust store. |
| |
| </body> |
| </html> |
| |