I installed a pipeline between the client and server which shows the problem:
POST /seems-ejb/SeemsServiceImpl HTTP/1.1
User-Agent: Profile/MIDP-1.0 Configuration/CLDC-1.0
<?xml version="1.0" encoding="utf-8"?>
HTTP/1.1 200 OK
X-Powered-By: Servlet 2.4; JBoss-4.0.4.GA (build: CVSTag=JBoss_4_0_4_GA date=200605151000)/Tomcat-5.5
Set-Cookie: JSESSIONID=DAD82CAF9143C49861F34EFD5131AB5F; Path=/
Date: Mon, 16 Oct 2006 15:18:24 GMT
<env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'><env:Header/><env:Body><ns1:sayHelloResponse xmlns:ns1='http://seems.kahosl.be/jaws' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'><ns1:result>Hello:)
This is a normal HTTP chunked message. The message is split into multiple chunks, each chunk starts with the length in hex, followed by the data. The end is signified by a 0 length chunk.
Can I disable HTTP chunking?
[01:17:58] Thomas Diesler: so if the receiver cant handle it, it their problem?
[01:18:10] Jason Greene: yeah then they aren't HTTP/1.1 compliant
[01:18:20] Thomas Diesler: merci
[01:18:34] Jason Greene: in which case we can add them to the restricted agent list
[01:18:36] ? in tomcat
[01:18:42] ? which will downgrade them to 1.0
[01:19:18] Thomas Diesler: is this a tomcat feature?
[01:19:30] Jason Greene: yes its in the server.xml file
[01:19:56] ? there might be some other option to always disable chunked
[01:20:14] ? but that would cause tomcat to double before the entire response to get the length
I tried setting the "Connection: close" parameter on the client side for the HTTP connection, but that didn't work because the WTK webservices don't have any API to access the HttpConnection AFAIK