Re: Problem with chunked encoding

Stefan Haustein <[email protected]> Mon, 31 Mar 2003 14:54:25 +0200
Newsgroups gmane.comp.java.enhydra.ksoap
Organization Univ. Dortmund FB 4 LS 8
Message-ID <[email protected]>

José María del Álamo wrote:
> Hi all, I'm using KSOAP for contacting a web service in Axis (placed in 
> WLServer 6.1). The problem is that if I try to call the service from a 
> Midlet runing in the emulator from the j2me wireless toolkit 1.0.3 (from 
> Sun One Studio), i get a ParseException because doesn't know the 
> character '0204' (the length of the first package the server send as a 
> response). This is the response message:

Hi José,

to me, this seems like a bug in the WTK or the underlying JDK: 0204 and 0000 
should not be visible for the application at all, chunked encoding should be 
handled by the JRE implicitly and be transparent to the target application.

If you try the latest JDK and WTK, does the problem persist?

Best,
Stefan






>  
> HTTP/1.1 200 OK
>  
> Date: Thu, 27 Mar 2003 15:39:19 GMT
>  
> Server: WebLogic WebLogic Server 6.1 SP4  11/08/2002 21:50:43 #221641
>  
> Content-Type: text/xml; charset=utf-8
>  
> Transfer-Encoding: Chunked
>  
>  
>  
> 0204
>  
> <?xml version="1.0" encoding="UTF-8"?>
> <soapenv:Envelope 
> xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" 
> xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
>  <soapenv:Body>
>   <ns1:seleccionarResponse 
> soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" 
> xmlns:ns1="OfertaServicio">
>    <seleccionarReturn xsi:type="xsd:string">Hola majete, tu mensaje: 
> servicio1</seleccionarReturn>
>   </ns1:seleccionarResponse>
>  </soapenv:Body>
> </soapenv:Envelope>
>  
> 0000
> I have read that could be problems with the server and mobile HTTP 
> versions, but I have seen that the server uses HTTP 1.1 and also KSOAP does.
> Where is the problem? What am I making in the wrong way?
>  
> Thanks in advance.

-- 
Stefan Haustein
Univ. Dortmund, FB 4, LS 8   tel: +49 231 755 2499
Baroper Str. 301             fax: +49 231 755 5105
D-44221 Dortmund (Germany)   www-ai.cs.uni-dortmund.de