Skip to main content

Tripped up by Apache XML-RPC not encoding the string type

Posted by alanwilliamson on December 4, 2003 at 3:12 AM PST

Last night I was plumbing in access to an XML-RPC server from a Java application. I was using the excellent XML-RPC package from Apache for the client. It is a beautifully crafted piece of software, just for the sheer ease of use alone.

However, I came a little unstuck when hitting one particular server. I know the default value for XML-RPC is to assume the type, but this server was looking for it and kept throwing invalid RPC request. This is an example of the output that was passed out to the server:

<?xml version="1.0" encoding="ISO-8859-1"?>

Which is perfectly legal, even though it doesn't explicitly type the value of the params. Trawling through Google, I noticed this tripping a few others as well. Usually Apache are quite anal about following standards, so it was a bit of a surprise to see this one slipping through the net.

So if you are doing any XML-RPC stuff, watch out for this one, just incase your server's implementation isn't too flexible.

Related Topics >>