Closed GoogleCodeExporter closed 9 years ago
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.
Original comment by mattias....@gmail.com
on 19 Nov 2010 at 2:57
Attachments:
Thanks for this Mattias, I'll look at trying to patch that in at some point
over the next week or so.
Original comment by jon@sprig.gs
on 19 Nov 2010 at 4:00
Perfect! Just went looking for this and it's good to see that it will be
implemented.
Thanks Mattias and Jon! :)
Original comment by Leige...@gmail.com
on 22 Nov 2010 at 8:12
Great, thanks!
Original comment by raffscal...@gmail.com
on 22 Nov 2010 at 8:00
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.
Original comment by mattias....@gmail.com
on 23 Nov 2010 at 7:42
Attachments:
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!
Original comment by jon@sprig.gs
on 23 Nov 2010 at 9:39
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.
Original comment by Leige...@gmail.com
on 23 Nov 2010 at 11:53
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!
Original comment by jon@sprig.gs
on 24 Nov 2010 at 9:45
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.
Original comment by jon@sprig.gs
on 24 Nov 2010 at 7:57
Sorry, I won't be able to test it until this Saturday.
Original comment by Leige...@gmail.com
on 25 Nov 2010 at 4:11
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
Original comment by Leige...@gmail.com
on 2 Aug 2011 at 4:00
Original comment by jon@sprig.gs
on 2 Aug 2011 at 5:23
Indeed. It does work now. Thanks.
Original comment by raffscal...@gmail.com
on 2 Aug 2011 at 3:30
[deleted comment]
[deleted comment]
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)) {
Original comment by sidzan...@gmail.com
on 3 Oct 2011 at 1:03
Hi,
i had also a problem with support of two data types you use:
Apache says that "nil" and "i8" are extension data types:
http://ws.apache.org/xmlrpc/types.html
Those types are always used with namespace "ex", which refers to the namespace
URI "http://ws.apache.org/xmlrpc/namespaces/extensions". So I'm wondering how
this "nil" works for you, as the specification says that it needs this "ex"
prefix (same with "i8").
Therefore, I made two changes:
1) added "ex:" before the type constants in IXMLRPCSerializer:
String TYPE_I8 = "ex:i8";
String TYPE_NULL = "ex:nil";
2) added the namespace to the generated request XML in XMLRPCClient in method
"methodCall" after line "serializer.startDocument(null, null);":
serializer.setPrefix("ex", "http://ws.apache.org/xmlrpc/namespaces/extensions");
This works fine for me. Maybe there would be an easier solution for this as you
obviously have no problems in this area, but I wasn't able to figure out
anything else.
Thanks.
Reinhard Freiler
Original comment by reinhard...@gmail.com
on 13 Jan 2013 at 2:19
Original issue reported on code.google.com by
raffscal...@gmail.com
on 19 Feb 2010 at 7:30