You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by Saminda Abeyruwan <sa...@opensource.lk> on 2005/06/17 08:19:14 UTC

[Axis2] Client Side commons-httpClient support

Hi all,

 

We would like to come up with the following proposals to transport
selection, chunking and keep-alive in Client side.  

 

Transport Sender will be implemented using commons-httpClient-2.0.jar
functionalities. 

 

To take the maximum flexibility, we would like to know the transport version
prior sending POST. In order to implement this, Call object's
setTransportInfo() method should be given with a required transport version.
Currently "HTTPConstants.HTTP" static variable has a value of "HTTP/1.0". We
would propose to have two static variables in "HTTPConstants", as HTTP10 and
HTTP11, which have values of "HTTP/1.0" and "HTTP/1.1". Using this we can
select the transport version. 

 

HTTP1.1 is the only transport version that supports chunking. Default chunk
size is taken as Integer.MAX_VALUE. We would like if the chunking option
would be given to the user as well.  

 

HTTP1.0 keep-alive is given with the transport header "Connection:
Keep-alive". Keep-alive is default in HTTP1.1  

 

PostMethod is the class that carries out all the necessary functionalities
related to POST. Thus, an object of PostMethod should be incorporated to the
MessageContext from the engine. 

 

We proposed to have three over load methods as follows, 

 

public abstract void writeMessage (MessageContext msgContext, HttpMethodBase
method) throws AxisFault;

 

public abstract void startSendWithToAddress(MessageContext msgContext,
HttpMethodBase method )  throws AxisFault;

 

public abstract void finalizeSendWithToAddress(MessageContext msgContext,
HttpMethodBase method) throws AxisFault;

 

OR.

 

using MessgeContext.getProperty(HTTPConstants.POST_MEHTOD), extract the
PostMethod object and use with the existing methods. In this case a Writer
class reference will be input to the methods, but no use will come from it. 

 

As this class get support from commons-httpClient -2.0.jar  facilities, we
proposed to name it as CommonsHTTPTransportSender, which is located at
org.apache.axis.trasport.httpClient package. 

 

Please comment on this.

 

Thanks