Subject:Web Service Call with Axis: No HTTP Content-Length causing Server error Author:Redha B Date:21 Feb 2008 01:29 PM
Doing a Web Call using Axis as a client, generates error with some Web server (in my case CICS 3.1 Web Server). The same call with a scenario using .NET works. Using TCPMon, I found out the HTTP content-length was missing.
The same call with .NET:
Request:
--------
POST /CICS/CWBA/CSCWKI2X/FLIGHTWX HTTP/1.1
SOAPAction: "FLIGHTWS"
User-Agent: Stylus Studio Web Service Client
Content-Type: text/xml
Host: mkt.neonsys.com:9999
Content-Length: 483
Expect: 100-continue
Connection: Keep-Alive
Subject:Web Service Call with Axis: No HTTP Content-Length causing Server error Author:Redha B Date:21 Feb 2008 06:35 PM
Thanks Ivan.
I did some research on this and it seems that it's a limitation of the CICS 3.1 Web Sever; the header Content-Length is mandatory for HTTP/1.1 even with the header "Transfer-Encoding: chunked"; contrary to the HTTP spec:
"CICS requires the Content-Length header on all inbound HTTP/1.1 messages that have a message body. If a message body is present but the header is not provided, or its value is inaccurate, the socket receive for the faulty message or for a subsequent message can produce unpredictable results. For HTTP/1.0 messages that have a message body, the Content-Length header is optional." http://publib.boulder.ibm.com/infocenter/cicsts/v3r1/index.jsp?topic=/com.ibm.cics.ts31.doc/dfhtl/topics/dfhtl_headerref.htm