How to send an XML-RPC request using HTTP POST

by Mihnea Teodorescu

If you used XML-RPC for building server interfaces, you must probably have got into a very simple problem: testing your XML-RPC server. Since you may not want to use the apache XML-RPC client and librairies, I propose you a "quick and dirty" way to send an XML-RPC requests over HTTP POST in java. The only thing is that you must have the XML-RPC request already built before starting.
So, if I want to test my XML-RPC server running at http://www.mihneateodorescu.ro/RPC, using this XML request, I will use this java code.

Just compile the source code and you can use it right away!
The XML samples credit goes to http://en.wikipedia.org/wiki/XML-RPC.

No comments: