Re: URGENT:!!! Please help insert XML data in kSOAP envelope

Stefan Haustein <[email protected]> Thu, 30 Oct 2003 12:26:37 +0100
Newsgroups gmane.comp.java.enhydra.ksoap
Message-ID <[email protected]>
[email protected] wrote:
> Hi,
>     :-(
>  
> well, i don't know exactly how ur application is written, but things that come
> to my mind are:
> - write recursive call that parses the returned XML , and from that build a SoapObject. it's long time
> that i don't write parsing code :-(, i usually do it with SAX, but i don't know if the query is generated
> on the Mobile Device) . this can be tough (altough not impossible :-) because i don't know if the query
> has 'same structure' but different value

I think there are two more options:

- derive your own class from the ksoap2 SoapEnvelope, overwriting writeBody (and 
parseBody for the response). In that case, the part generating the XML code 
would need adoption to write the XML to a KXmlSerializer. That would have the 
advantage that KXML handles XML escaping etc. automatically.

- Write the SOAP header and your content directly to the HTTP connection... You 
still could use ksoap to parse the response if that helps.

Best regards,
Stefan