Problems with server side kSoap 2
[email protected] Tue, 27 May 2003 11:45:41 +0200
| Newsgroups | gmane.comp.java.enhydra.ksoap |
|---|---|
| Message-ID | <[email protected]> |
Hi,
I'm porting a SERVER-SIDE web application using kSoap 1.2 (with the
KSoapServlet) to kSoap 2 (using SOAP 1.1 and soap encoding).
I have several problems. My test client uses kSoap 1.2 to create and send
a request to my kSoap 2 server.
Here is the request :
<SOAP-ENV:Envelope xmlns:n0="urn:RcsWebServices"
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/">
<n0:getEpg id="o0" SOAP-ENC:root="1">
<options xsi:type="n0:properties" />
</n0:getEpg>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
When my KSoapServlet parses this request, the following exception occurs :
11:31:22,851 WARN [KSoapServlet] Throwable caught, a soap fault will be
returned
java.lang.NullPointerException
at
org.ksoap2.serialization.SoapSerializationEnvelope.readSerializable(Unknown
Source)
at
org.ksoap2.serialization.SoapSerializationEnvelope.readInstance(Unknown
Source)
at org.ksoap2.serialization.SoapSerializationEnvelope.read(Unknown
Source)
at
org.ksoap2.serialization.SoapSerializationEnvelope.parseBody(Unknown
Source)
at org.ksoap2.SoapEnvelope.parse(Unknown Source)
....
Also, as the KSoapServlet try to send a SoapFault because of the previous
exception, another one accurs !
11:31:22,951 ERROR [KSoapServlet] Unexpected error occured while sending
soap response
java.lang.RuntimeException: Cannot serialize: SoapFault - faultcode:
'Server' faultstring: 'null' faultactor:
'null' detail: null
at
org.ksoap2.serialization.SoapSerializationEnvelope.writeBody(Unknown
Source)
at org.ksoap2.SoapEnvelope.write(Unknown Source)
...
It's very weird !! Any ideas ??
Also, as I'm writing custom marshallers, I noticed the following :
- SoapSerializationEnvelope.read(XmlPullParser parser, Object owner, int
index, String namespace, String name, PropertyInfo expected)
should be declared PUBLIC instead of protected, otherwise it cannot be
accessed by custom marshallers in other packages.
- Please add extra constructors to PropertyInfo or just uncomment the ones
in the source code
Hope someone (Stephan ???? :-) can help me !
Regards,
Sebastien.