hello I'm using this XML-RPC client for android for my thesis. I fixed so
it is possible to receive null.
added these lines in XMLRPCSerializer.java around line 127.
if (typeNodeName.equals(TYPE_NULL)){
parser.nextTag();
obj = null;
}
added TYPE_NULL = "nil" in IXMLRPCSerializer.java
hope that someone have some use for it.
Attachments:
XMLRPCSerializer.java 7.2 KB
IXMLRPCSerializer.java 895 bytes
Comment #2 on issue 19 by j...@sprig.gs: Support for <nil/> value extension
to the XML-RPC spec?
http://code.google.com/p/android-xmlrpc/issues/detail?id=19
Thanks for this Mattias, I'll look at trying to patch that in at some point
over the next week or so.
Perfect! Just went looking for this and it's good to see that it will be
implemented.
Thanks Mattias and Jon! :)
Great, thanks!
I added support for send null as well.
added these lines around line 29.
if (object == null){
serializer.startTag(null, TYPE_NULL).endTag(null, TYPE_NULL);
}
I hope that it works well.
Thanks for a great library.
Attachments:
XMLRPCSerializer.java 7.3 KB
Comment #6 on issue 19 by j...@sprig.gs: Support for <nil/> value extension
to the XML-RPC spec?
http://code.google.com/p/android-xmlrpc/issues/detail?id=19
Hi mattias.ellback, thanks for these great fixes. I'm just adding them into
the code now, ready for pushing.
Would it be possible, in the future, to supply patches rather than complete
files? These can be created at the command line, by typing svn diff, or
your IDE may supply some route to create patches. It simply makes it easier
to see what the changes are you're introducing, although, to be fair, you
also document them in the comments, but it would save repeating them
twice :)
These patches are a real boon to anyone using this library. Top marks!
Yes, the XML-RPC API I wish to connect to uses <nil/> so much that it's
*almost* useless to connect to it unless it is supported :) Thanks for
taking the time to add this into the official release Jon.
Comment #8 on issue 19 by j...@sprig.gs: Support for <nil/> value extension
to the XML-RPC spec?
http://code.google.com/p/android-xmlrpc/issues/detail?id=19
It's in the repo now. Any chance someone can test it? (My XMLRPC service is
currently down, and I don't know when I'll have the chance to fix it any
time soon...)
Thanks!
I've just compiled the app and confirmed it compiles and runs properly at
least (with the test app and server in the repo), but, to confirm, I still
need to know whether this resolves the initially raised issue.
Sorry, I won't be able to test it until this Saturday.
Sorry about taking so long to get back to you, but I tested this about a
month ago and everything seemed to work correctly, so I believe </nil> is
now supported correctly.
Cheers,
Shane
Comment #12 on issue 19 by j...@sprig.gs: Support for <nil/> value extension
to the XML-RPC spec?
http://code.google.com/p/android-xmlrpc/issues/detail?id=19
(No comment was entered for this change.)
Indeed. It does work now. Thanks.
Had similar problem with value ex:nil, resolved by adding
TYPE_NULL2 = "ex_nil"
to file
IXMLRPCSerializer.java
and modifying above code to
if (typeNodeName.equals(TYPE_NULL) || typeNodeName.equals(TYPE_NULL2) {
Had similar problem with value ex:nil, resolved by adding
TYPE_NULL2 = "ex:nil"
Had similar problem with value ex:nil, resolved by adding
String TYPE_NULL2 = "ex:nil";
to file
IXMLRPCSerializer.java
and modifying above code to
if (typeNodeName.equals(TYPE_NULL) || typeNodeName.equals(TYPE_NULL2)) {