[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Ksoap: running StockQuoteDemo on Palm


Hi,
 
I've some further information about my problem runnig ksoap on the palm emulator. I've sniffed the HTTP-packets of the example running on the MIDP emulator and the palm emulator. I think the implementiation of HTTP in the palm-MIDP is responsible for the difficulties:
 
 
Palm-HTTP-packet:
**********************

POST /soap HTTP/1.1
SOAPAction: urn:xmethods-delayed-quotes#getQuote
Host: services.xmethods.net:80
Transfer-Encoding: chunked
Connection: close
Content-Type: text/xml
1f6
<SOAP-ENV:Envelope xmlns:xsd="
http://www.w3.org/1999/XMLSchema"
  xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
  SOAP-ENV:encodingStyle="
http://schemas.xmlsoap.org/soap/encoding/"> 
  <SOAP-ENV:Body>
     <getQuote xmlns="urn:xmethods-delayed-quotes" id="o0" root="1">
      <symbol xmlns="" xsi:type="xsd:string">IBM</symbol>  
     </getQuote> 
    </SOAP-ENV:Body>
 </SOAP-ENV:Envelope>
 
 
 
MIDP-emulator-packet
**************************
 
POST /soap  HTTP/1.1
SOAPAction: urn:xmethods-delayed-quotes#getQuote
Host: services.xmethods.net:80
Content-Type: text/xml
Content-Length: 502
<SOAP-ENV:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
   SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">                
   <SOAP-ENV:Body>
     <getQuote xmlns="urn:xmethods-delayed-quotes" id="o0" root="1">
       <symbol xmlns="" xsi:type="xsd:string">IBM</symbol>
     </getQuote>
   </SOAP-ENV:Body>
 </SOAP-ENV:Envelope>
 
 
The diffrences:
- 1f6 is Hex for 502 and seems to be the Content-Length
 
- remember the fault:
 
  <soap:Fault>
       <faultcode>soap:Client</faultcode>
       <faultstring>decoding error: electric.xml.ParseException:
                         the document does not have exactly one rootline 1, char 0: ...</faultstring>
  </soap:Fault>
 
is it possible that the "other root" is the "1f6" in line 1, char 0 and confusing the xml-parser on the server ?
 
- in the HTTP-spec I read that the "1f6" must have something to do with the "Transfer-Encoding: chunked".
  Is the real problem, that the soap-server doesn't understand this?
 
- what is the meaning of "Connection: close"?
 
Are my considerations right? Is the HTTP implementation of the palm-MIDP the problem?
Is there an HTTP-specialist who can drop me a line?
 
Thanks
    Alexander