Hi everybody,

I am trying to use the CommonHTTPSender instead of the HTTPSender in order
to use keep-alive connections to the server (using a nightly build of the
Axis toolkit, build from 09/09/03).
My client does the following:

   this.soapCall= (Call) service.createCall();
   soapCall.setReturnType(org.apache.axis.Constants.XSD_STRING);
   soapCall.setOperationName(new QName("AxisPing","ping"));
        
   org.apache.axis.MessageContext msgContext = soapCall.getMessageContext();

   java.util.Hashtable userHeaderTable = new java.util.Hashtable();
   userHeaderTable.put(HTTPConstants.HEADER_CONNECTION_KEEPALIVE,
                       "keep-alive");
   userHeaderTable.put("foobar", "blabla");
   msgContext.setProperty(HTTPConstants.REQUEST_HEADERS, userHeaderTable);
   
   soapCall.invoke(Object[] null);

This approach does not work because of the implementation of the
invoke(Object[]) itself calls the invoke(). This method calls the reset()
method of the MessageContext class, which removes all settings of the
MessageContext
Can anybody of you tell me how to configure the HTTP Transport to use
keep-alive.

Thank you very much,
Thomas

Reply via email to