Poor performance in parsing kSOAP response. Ideas?
"Jonathan Trevor" <[email protected]> Thu, 13 Feb 2003 17:40:55 -0800
| Newsgroups | gmane.comp.java.enhydra.ksoap |
|---|---|
| Message-ID | <[email protected]> |
Hi,
I'm using kSOAP to call .NET web services. I managed to get both the
.NET services and the kSOAP calls to work correctly after reading a few
very useful messages here.
However, Im seeing really really poor performance from the kxml parser
running the the J2ME wireless toolkit emulator (no "slow down" options
used). I added some timing code around the http transport and the parser
is taking over 50 seconds for an array of 60 results of this "GetInfo"
response:
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:tns="http://blah.blah.com/"
xmlns:types="http://blah.blah.com/encodedTypes"
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body
soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<GetInfoResponse>
<GetInfoResult href="#id1" />
</GetInfoResponse>
<soapenc:Array id="id1" soapenc:arrayType="types:Details[2]">
<Item href="#id2" />
<Item href="#id3" />
</soapenc:Array>
<types:Details id="id2" xsi:type="types:Details">
<ID xsi:type="xsd:int">int</ID>
<Target xsi:type="xsd:string">string</Target>
<Target2 xsi:type="xsd:string">string</Target2>
<Target3 xsi:type="xsd:string">string</Target3>
<Hkey xsi:type="xsd:long">long</Hkey>
</types:Details>
<types:Details id="id3" xsi:type="types:Details">
<ID xsi:type="xsd:int">int</ID>
<Target xsi:type="xsd:string">string</Target>
<Target2 xsi:type="xsd:string">string</Target2>
<Target3 xsi:type="xsd:string">string</Target3>
<Hkey xsi:type="xsd:long">long</Hkey>
</types:Details>
</soap:Body>
</soap:Envelope>
That's unusably slow.
In addition, I am working from the source distribution which I have
modified slightly to handle cookies in the http transport class, as I
need it for session tracking, and added the support for dates and base64
byte arrays.
Any thoughts on this performance? Is it what I should expect? I guess if
it is then I'm going to need to write some horrible http proxy coding
techniques and avoid soap entirely - which is a great shame!
Thanks
Jonathan