rpc-xml
rpc-xml copied to clipboard
Upgrade from 0.73 to 0.82
Hello,
I'm maintaining an XML::RPC server application running on RPC::XML version 0.73.
I try to update to 0.82 but my function names are no longer accepted by RPC::XML.
The error message is: RPC::XML::request::new: Invalid method name specified
My function names have all a prefix containing a "-" sign and the dash causes the error.
$cli->send_request('de.bw-fe.aht.login',$mn,$user)
Please add the dash again to the allowed characters in function names.
Interesting-- I can't imagine I would have just removed that from the module without having a reason. I'll need to find the specific commit that made that change, and then see why it was made. I'll also double-check the XML-RPC specification, to see if maybe that was the source.
OK, I have found when the change was made (version 0.75), and I have found out WHY I added the test against the method name:
The <methodCall> must contain a <methodName> sub-item, a string, containing the name of the method to be called. The string may only contain identifier characters, upper and lower-case A-Z, the numeric characters, 0-9, underscore, dot, colon and slash. It's entirely up to the server to decide how to interpret the characters in a methodName.
That's from the XML-RPC specification.
I'm not sure whether I should change this back or not, to be honest. Allowing something beyond the constraints of the specification could lead to issues in interoperation with XML-RPC implementations in other languages.
What are your thoughts on this? What would be the approximate effort of changing the names on your side, for all names that currently contain a -
character?
Okay I see your point.
In the moment my task is to deploy this application (that was meant to be replaced) on a new host. I have only access to the server side. The clients side should stay "untouched".
I think the default behaviour should obey to the specification, although it would be nice to have some kind of legacy mode.
For now I just added the "-" in my local copy of the source code. As far as I can see there is only one place the function name gets checked. I can live with that too.