Apache XML-RPC 3 with Spring Controllers

XML-RPC is a nice, simple remoting protocol that involves little excess configuration. In a project I own, there was a requirement for a trivial remoting protocol and XML-RPC fit the bill nicely. A staple of my projects is usually the Spring Framework, and in this case, the XML-RPC solution should fit elegantly into my existing project infrastructure. I selected Apache XML-RPC 3.0 for its maturity of code.

However, in its out-of-the-package form, Apache XML-RPC is incompatible for working with Spring and needs to have some plumbing created in order for it to drop in nicely.

There is an article by Dejan Bosanac at the ONJava Blog that claims to work with Apache XML-RPC 3.0, but it does not. I had to make my own solution.

In order to integrate with Spring, several components need to be created, and I document them below. The first order of business is the Spring MVC controller. The other pieces subclass components from Apache's implementation to allow us the behavior we require when used with Spring. Finally, I tie this all together with an example applicationContext.xml configuration file.

Comment

No HTML is allowed. Numeric entity refs (&#nnnn;) are supported. Use {{{ and }}} to delimited preformatted sections. Items noted by * are mandatory.

Identify yourself

All new comments are moderated for spam protection. Email addresses are visible only to the entry owner and administrators.

  • Use AccessKey-P to Preview and AccessKey-S to Post