Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

default value type 'string' correctly handled? #4

Closed
dehubbed opened this issue Oct 3, 2011 · 3 comments
Closed

default value type 'string' correctly handled? #4

dehubbed opened this issue Oct 3, 2011 · 3 comments

Comments

@dehubbed
Copy link

dehubbed commented Oct 3, 2011

As per spec: "If no type is indicated, the type is string." Is this being correctly handled? Running necessary-evil as client against the Java XML-RPC reference implementation as server I get responses in the form of

<?xml version="1.0"?><methodResponse><params><param><value><struct><member><name>foo</name><value></value></member><member><name>bar</name><value>xyz</value></member></struct></value></param></params></methodResponse>

which cause NullPointerExceptions in clojure.zip$node.invoke. Note that the response don't specify the type on strings and even contains empty string both of which are legit AFAIK.

@brehaut
Copy link
Collaborator

brehaut commented Oct 3, 2011

It should be handling untyped parameters as strings correctly. However, there may be a bug around empty parameters, and i can reproduce your issue. I'll look into producing a fix for this over the next few days.

(Also, do you have a citation for the java xml-rpc imp being the reference implementation? I have found the spec to be silent on the issue, and id like to know)

@dehubbed
Copy link
Author

dehubbed commented Oct 4, 2011

Thanks for the coming fix -- normally I'd do it myself but I'm relatively new to Clojure. As for the reference implementation, not sure why I was thinking that. May just have been me with my Java goggles on.

@brehaut
Copy link
Collaborator

brehaut commented Oct 6, 2011

I have put a fix in place that resolves this issue.

I'll back port this to a 1.2.x branch and release that along with the next 2.0.0-SNAPSHOT.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants