You could also set the HTTP protocol version to 1.0 which does not use
chunked data transfer.
 
        stub._setProperty (
org.apache.axis.MessageContext.HTTP_TRANSPORT_VERSION ,
org.apache.axis.transport.http.HTTPConstants.HEADER_PROTOCOL_V10 ) ;
 
HTTP 1.1 uses chunked data transfer by default.
 

-----Original Message-----
From: Punnoose, Roshan [mailto:[EMAIL PROTECTED]
Sent: Tuesday, 23 January 2007 3:41 AM
To: axis-user@ws.apache.org
Subject: RE: Content length must be specified



I'm using Axis 2.0, but I don't think it would have changed. This is what I
did: added an option:

 

Options.setProperty(HTTPConstants.CHUNKED, false);

 

This forces Axis to add the Content-Length field in the HTTP Header.

 

Hope that helps.

 

Roshan Punnoose

Phone: 301-497-6039


  _____  


From: Dorner, Thomas [mailto:[EMAIL PROTECTED] 
Sent: Monday, January 22, 2007 10:57 AM
To: axis-user@ws.apache.org; axis-dev@ws.apache.org
Subject: Content length must be specified

 

Hello, 

I think I have some problem by using axis 1.4 Final with CommonsHTTPSender! 

The request is missing the "content-length" in the HTTP-Header (This problem
is knwon from Axis 1.2 ...). 
Instead there is a "Transfer-Encoding: chunked"! 

Is not a problem as long I am using an Axis Web-Service - but if I call a
Service which is implemented with the old IBM SOAP or a Lotus Notes Service,
I got the following error.

         <SOAP-ENV:Fault> 
            <faultcode>SOAP-ENV:Protocol</faultcode> 
            <faultstring>Content length must be specified.</faultstring> 
            <faultactor>rpcrouter</faultactor> 
         </SOAP-ENV:Fault> 

Is there any known solution for this problem - is it a bug or do there
exists some propertie(s) I can set to handle this problem

Some helpfull hints will be great - Thanks in advance. 

Thomas 

 

The hole HTTP-Request I am sending: 

POST /DIAwebWebServices/rpcrouter HTTP/1.1 
Content-Type: text/xml; 
charset=utf-8 SOAPAction: "" 
User-Agent: Axis/1.4 
Host: 127.0.0.1:9090 
Transfer-Encoding: chunked  

1c0 
<?xml version="1.0" encoding="UTF-8"?> 
   <soapenv:Envelope xmlns:soapenv="
http://schemas.xmlsoap.org/soap/envelope/
<http://schemas.xmlsoap.org/soap/envelope/> " xmlns:xsd="
http://www.w3.org/2001/XMLSchema <http://www.w3.org/2001/XMLSchema> "
xmlns:xsi=" http://www.w3.org/2001/XMLSchema-instance
<http://www.w3.org/2001/XMLSchema-instance> ">

      <soapenv:Body> 
         <ns1:createAccess soapenv:encodingStyle="
http://schemas.xmlsoap.org/soap/encoding/
<http://schemas.xmlsoap.org/soap/encoding/> " xmlns:ns1="xxx"> 
            <clientid xsi:type="xsd:string">xxx</clientid> 
         </ns1:createAccess> 
      </soapenv:Body> 
   </soapenv:Envelope>0  
  
  
  

Reply via email to