HTTP transports

CommonsHTTPTransportSender

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

Chunking support and KeepAlive support also integrated via the facilities provided by commons-httpclient along with HTTP 1.1 support.

<transportSender/> element is used to define transport senders in the axis2.xml as follows:

<transportSender name="http" class="org.apache.axis2.transport.http.CommonsHTTPTransportSender">
<parameter name="PROTOCOL" locked="xsd:false">HTTP/1.1</parameter>
<parameter name="Transfer-Encoding">chunked</parameter>
</transportSender>

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.

These are the only parameters that is available from deployment. Other parameters such as character encoding style etc, are provided via MessageContext.

HTTPS support

It should be noted that CommonsHTTPTransportSender can be used to communicate over https.
<transportSender name="https" class="org.apache.axis2.transport.http.CommonsHTTPTransportSender">
<parameter name="PROTOCOL" locked="xsd:false">HTTP/1.1</parameter>
<parameter name="Transfer-Encoding">chunked</parameter>
</transportSender>
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.