Re: Problems with KSoap2

Michael Yuan <[email protected]> Thu, 28 Nov 2002 18:25:39 -0600 (CST)
Newsgroups gmane.comp.java.enhydra.ksoap
Message-ID <[email protected]>
Hi Randy,

kSOAP 2 is still under development. It is alpha quality at best right now.
The dotNet swtich is introduced to provide compatibility with .NET
servers. (Ironic, isn't Web service all about open standard?) But I have
not had time to test it with a real .NET server yet.

In the meanwhile, if you need something that actually works in production
enviornment, check out kSOAP v1.2. It does not handle SoapFault. But
should most features a light weight SOAP client needs.

cheers
Michael
----------------------------------------------------------------------------
Read Michael Yuan's technology articles
http://www.enterprisej2me.com/articles.php
Dr. Dobbs Journal, JavaWorld, IBM developerWorks and more ...
----------------------------------------------------------------------------

On Wed, 27 Nov 2002, Randy Fish wrote:

> I just downloaded an tried out the new KSoap2 that was release on the 20th
> of Nov. 2002.
>
> It seems as if there are a few problems:
>
> 1.) Currently, SoapFault objects are not being handled in the SoapServlet
> properly.  What I mean by that is that they are caught and even set in the
> Envelope, but when it comes time to serialize them out to the response, the
> writeObject does not know what to do with them and hence, throws some sort
> of Exception.
>
> 2.) As of right now, the dotNet flag in the envelope does nothing.  It is
> used to assign some sort of namespace variable, but that variable is never
> used.  We use a development tool called IntelliJ and the latest version of
> the IDE show all unaccessed local varaibles.  ;)
>
> 3.) I am using this to do some of UPnP and in UPnP there are some rules
> about namespaces and such that I had to work around.  It seems like they
> require (or at lease recommend) the envelope namespace to have a prefix of
> "s".  I could not find a way to set the prefixes of such things.
>
> 4.) In the readSerializable method of SoapSerializationEnvelope, there is a
> snippet that checks to see if the namespaces and such match...well it is
> possible for the info.namespace to be null and in this case, we get a
> NullPointerException.  Maybe that is what the dotNet flag is for (the
> comments in the code led me to believe that) but in any case, I changed it
> to the following, and it seemed to work:
>
> 	if (info.name == null
>       	? testIndex == sourceIndex
>             : (info.name.equals(name)
> 			&& info == null 			// <----- 	seems pointless since we would have gotten
> a
> 								// 		null pointer at the info.name
> 			|| (info.namespace == null
> 				|| info.namespace.equals(parser.getNamespace())
> 			)
> 		)
> 	)
>                     break;
>
> In order to work around these problems, I had to subclass
> SoapSerializationEnvelope and rewrite a few of the methods.  All in all,
> things look pretty good, but I wanted to make you aware of the problems I
> found.  Let me know if and when they get fixed so I can download a new
> binary and source, etc.
>
> Randy Fish
> Software Engineer
> SimpleDevices, Inc.
> http://www.simpledevices.com
>
> _______________________________________________
> Ksoap mailing list
> [email protected]
> http://www.enhydra.org/mailman/listinfo.cgi/ksoap
>