You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by "Doolittle, Todd" <TD...@searshc.com> on 2006/09/20 15:50:43 UTC

No content length

I am trying to hit a public service (TerraService) with a client
generated from last night's Axis 2 build.  I believe the service is a
..NET service.  I created the client from the WSDL2JAVA tool based on the
WSDL.  When I send a request, I get a fault back from the server stating
that the Content-Length header is missing.  Using tcpmon, I checked and
it does look like it is missing.  Is there some way to get Axis 2 to put
the Content-Length header on the request?

Here is the output from tcpmon:

POST /TerraService2.asmx HTTP/1.1
SOAPAction: http://terraservice-usa.com/ConvertPlaceToLonLatPt
User-Agent: Axis2
Host: terraservice-usa.com
Transfer-Encoding: chunked
Content-Type: text/xml; charset=UTF-8

183
<?xml version='1.0' encoding='UTF-8'?><soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Heade
r /><soapenv:Body><ns1:ConvertPlaceToLonLatPt
xmlns:ns1="http://terraservice-usa.com/"><ns1:place><ns1:City>Troy</ns1:
City><ns1:State>Michigan</ns1:State><ns1:Country>USA</ns1:Country></ns1:
place></ns1:ConvertPlaceToLonLatPt></soapenv:Body></soapenv:Envelope>
0


Here is the fault that was returned...

Exception in thread "main" org.apache.axis2.AxisFault: HTTP Transport
error : '411' - 'Length Required'; nested exception is: 
	org.apache.axis2.AxisFault: HTTP Transport error : '411' -
'Length Required'; nested exception is: 
	org.apache.axis2.AxisFault: HTTP Transport error : '411' -
'Length Required'; nested exception is: 
	org.apache.axis2.AxisFault: HTTP Transport error : '411' -
'Length Required'
	at
org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(Common
sHTTPTransportSender.java:231)
	at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:641)
	at
org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOper
ation.java:355)
	at
org.apache.axis2.description.OutInAxisOperationClient.execute(OutInAxisO
peration.java:285)
	at
com.terraservice_usa.TerraServiceStub.ConvertPlaceToLonLatPt(TerraServic
eStub.java:814)
	at GetLonLat.main(GetLonLat.java:25)
Caused by: org.apache.axis2.AxisFault: HTTP Transport error : '411' -
'Length Required'; nested exception is: 
	org.apache.axis2.AxisFault: HTTP Transport error : '411' -
'Length Required'
	at
org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageW
ithCommons(CommonsHTTPTransportSender.java:335)
	at
org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(Common
sHTTPTransportSender.java:210)
	... 5 more
Caused by: org.apache.axis2.AxisFault: HTTP Transport error : '411' -
'Length Required'
	at
org.apache.axis2.transport.http.SOAPOverHTTPSender.send(SOAPOverHTTPSend
er.java:141)
	at
org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageW
ithCommons(CommonsHTTPTransportSender.java:329)
	... 6 more