ksoap vs Axis 1.1 client
"Makesh Rao" <[email protected]> Tue, 15 Jun 2004 13:10:00 -0700
| Newsgroups | gmane.comp.java.enhydra.ksoap |
|---|---|
| Message-ID | <[email protected]> |
Hi I have a server implemented in Axis 1.1 and running in Tomcat. Axis also generated the client stubs. I am also implementing an applet that need to connect to the server and I was planning to use ksoap. There is a distinct difference in the SOAP messages that the two implementations put out. With Axis client: <v:Envelope xmlns:i="http://www.w3.org/1999/XMLSchema-instance" xmlns:d="http://www.w3.org/1999/XMLSchema" xmlns:c="http://schemas.xmlsoap.org/soap/encoding/" xmlns:v="http://schemas.xmlsoap.org/soap/envelope/"> <v:Header/> <v:Body> <prepareConfigSet i:type="d:string"><TestMessage> Hello World </TestMessage> </prepareConfigSet> </v:Body> </v:Envelope> With ksoap : <SOAP-ENV:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"> <SOAP-ENV:Body SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"> <prepareConfigSet xmlns="http://tools.cisco.com/ict/types" id="o0" SOAP-ENC:root="1"> <request xmlns="" xsi:type="xsd:string"><TestMessage> Hello World </TestMessage> </request> </prepareConfigSet> </SOAP-ENV:Body> </SOAP-ENV:Envelope> The extra element <request> that ksoap writes, causes the server to throw a SAX Exception during the parsing. Any pointers on which one is the correct implentation ? I then modified the write() method in the SoapWriter to not write the extra element and the server accepted the message, but while parsing the response, ksoap throws a ClassCastException in the getResult() method in SoapEnvelope in the line : KvmSerializable ks = (KvmSerializable) body; Any help is really appreciated.. Thanks Makesh _________________________________________________________________ Watch the online reality show Mixed Messages with a friend and enter to win a trip to NY http://www.msnmessenger-download.click-url.com/go/onm00200497ave/direct/01/