Thanks Alick!
It is exactly what I need.

Joan

On 7/12/07, Alick Buckley <[EMAIL PROTECTED]> wrote:

 Hi,

 By default Apache Axis 1.4 uses '
org.apache.axis.transport.http.HTTPSender' for http sending.

It is possible to change this to use 'org.apache.commons.httpclient'.

Change the transport pivot attribute in the configuration to point to the
CommonsHTTPSender class.

<transport name="http" pivot="java:
org.apache.axis.transport.http.CommonsHTTPSender"/>

The following is an example of an axis client configuration file.

<?xml version="1.0" encoding="UTF-8"?>

<deployment name="defaultClientConfig"

        xmlns="http://xml.apache.org/axis/wsdd/";

        xmlns:java="http://xml.apache.org/axis/wsdd/providers/java";>

 <globalConfiguration>

   <parameter name="disablePrettyXML" value="true"/>

   <parameter name="enableNamespacePrefixOptimization" value="false"/>

 </globalConfiguration>

 <transport name="http" pivot="java:
org.apache.axis.transport.http.CommonsHTTPSender"/>

 <transport name="local" pivot="java:
org.apache.axis.transport.local.LocalSender"/>

 <transport name="java" pivot="java:
org.apache.axis.transport.java.JavaSender"/>

</deployment>

You also need to add the common.codec.1.3.jar and
common-httpclient-3.0-rc4.jar to the jar directory.

http://jakarta.apache.org/commons/

http://jakarta.apache.org/commons/httpclient/

http://jakarta.apache.org/commons/httpclient/features.html

http://jakarta.apache.org/site/downloads/downloads_commons.html

http://jakarta.apache.org/commons/httpclient/logging.html

By default commons http client uses HTTP protocol 1.1 and by default it
uses chunked transfer encoding.

So you might need to disable chunked transfer encoding


=====================================================================================

-----Original Message-----
*From:* Joan Barrull [mailto:[EMAIL PROTECTED]
*Sent:* Thursday, 12 July 2007 1:29 AM
*To:* [email protected]
*Subject:* How to set HTTP/1.1 with Axis1.4

Hi guys,

I am using Axis 1.4. My client, generated through wsdl2java, works fine.
Following is the piece of code that sends the request:

 MyServiceLocator  se = new MIBServiceLocator();

  MyPortType stub = se.getMIBPort(new java.net.URL(endPointMIB));

Problem is, when I monitor the request through the tcpmonitor, I get the
following header:

POST /isadpt_grupo1 HTTP/1.0


How can I modify my code in order to send through HTTP/1.1 instead of
HTTP/1.0?

Thanks in advance,

joan


Reply via email to