Utilizing Ruby on Rails Web Services with Java
Posted March 31st, 2007 by paulAs part of a project I’m currently working on, I’ve had to integrate a RoR application with another developer’s Java code. At first glance, things looked to be fairly simple as I envisioned a simple Web Service communication between Java and Ruby would be a breeze…not so fast. Getting the two to play nice with each other took some time as I was unaware that RoR only supports the RPC/encoded style/use and not Document/literal. After getting a prototyped client written read using Spring-ws (does not support RPC/encoded) I quickly found out that it was going to go nowhere fast. I ended up choosing to use Apache Axis as I’ve used it for a previous project, and I knew for sure it supported RPC/encoded.
Part of the reason for this blog is to share information from developer to developer issues that I’ve encountered that have either been unable or too busy to find solutions to. In this case my solution is to let the reader know that the best bet client to use when consuming RoR web services in Java is Apache Axis. If anyone would enjoy a code example or two I’d be glad to oblige…although the artifacts generated by Axis 1.4 are fairly involved, the process is fairly easy especially when using the SoapUI tool to generate the artifacts based on the RoR WSDL e.g. http://localhost:3000/web_service_name/service.wsdl .
One Response to “Utilizing Ruby on Rails Web Services with Java”
January 21st, 2008 at 9:12 am
Thank you, it explained my problem!
Leave a Reply