# SOAP or XML-RPC

**URL:** <https://www.ruby-forum.com/t/soap-or-xml-rpc/92336>\
**Category:** Rails\
**Created:** [April 18, 2007, 12:17pm UTC](https://www.ruby-forum.com/t/soap-or-xml-rpc/92336 "2007-04-18T12:17:06Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![guest](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/8dc957/32.png) [@guest](https://www.ruby-forum.com/u/guest)\
**Post date:** [April 18, 2007, 12:17pm UTC](https://www.ruby-forum.com/t/soap-or-xml-rpc/92336/1 "2007-04-18T12:17:06Z")

</div>

I need to use a third party web service and have a choice between a SOAP  
or XML-RPC interface. I have never used either and was wondering what  
people recommend in general and which is best supported/friendly with  
Rails.

Thanks,  
Bob

---

<div class="post-metadata">

**Author:** ![guest](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/8dc957/32.png) [@guest](https://www.ruby-forum.com/u/guest)\
**Post date:** [April 18, 2007, 2:58pm UTC](https://www.ruby-forum.com/t/soap-or-xml-rpc/92336/2 "2007-04-18T14:58:07Z")

</div>

Stay as far away from SOAP as you can possibly get. This post explains  
why:  
[http://wanderingbarque.com/nonintersecting/2006/11/15/the-s-stands-for-simple/](http://wanderingbarque.com/nonintersecting/2006/11/15/the-s-stands-for-simple/)

XML-RPC will work, though depending on how the webservice is supposed to  
work (are you dealing with data or are you telling the server to start  
some  
sort of processing?), REST may be your best bet. REST is now natively  
supported in Rails as of 1.2.3, and while I don’t know about hooking up  
XML-RPC, I’m sure there’s a plugin or two around to do this.

Jason

---

<div class="post-metadata">

**Author:** ![guest](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/8dc957/32.png) [@guest](https://www.ruby-forum.com/u/guest)\
**Post date:** [April 18, 2007, 3:45pm UTC](https://www.ruby-forum.com/t/soap-or-xml-rpc/92336/3 "2007-04-18T15:45:18Z")

</div>

For the record, I did not mention anything about soap4r, I’m talking  
about  
SOAP in general. No matter what language you’re using, I _highly_  
recommend  
you stay away from SOAP. Read the article I posted, even the developers  
of  
SOAP have deprecated the original acronym. The system is bloated,  
confusing,  
and even worse, NOT a standard.

If you’re choice is XML-RPC or SOAP, then go XML-RPC.

Jason

---

<div class="post-metadata">

**Author:** ![guest](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/8dc957/32.png) [@guest](https://www.ruby-forum.com/u/guest)\
**Post date:** [April 18, 2007, 3:04pm UTC](https://www.ruby-forum.com/t/soap-or-xml-rpc/92336/4 "2007-04-18T15:04:37Z")

</div>

On 4/18/07, Jason R. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Stay as far away from SOAP as you can possibly get. This post explains why:  
> [http://wanderingbarque.com/nonintersecting/2006/11/15/the-s-stands-for-simple/](http://wanderingbarque.com/nonintersecting/2006/11/15/the-s-stands-for-simple/)

A lot of people criticise Ruby’s soap4r implementation, but I wonder  
whether  
the perceived problem with soap4r is simply due to the fact that it is a  
different WS-stack to the one being communicated with (a complete no-no  
in WS-\* land).

soap4r is an implementation of a developers interpretation of an  
incomplete  
specification. Like _all_ WS-\* stacks.

The accepted wisdom in WS-\* implementations, is that if you are required  
to use a web service from a specific site or vendor, you use the _same_  
stack.

> XML-RPC will work, though depending on how the webservice is supposed to  
> work (are you dealing with data or are you telling the server to start some  
> sort of processing?), REST may be your best bet. REST is now natively  
> supported in Rails as of 1.2.3, and while I don’t know about hooking up  
> XML-RPC, I’m sure there’s a plugin or two around to do this.

Well the OP stated that his 2 choices were XML-RPC or SOAP. There wasn’t  
a REST option (which is far superior), of the 2, pick XML-RPC, Ruby is  
meant  
to have a really good implementation actually.

---

<div class="post-metadata">

**Author:** ![guest](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/8dc957/32.png) [@guest](https://www.ruby-forum.com/u/guest)\
**Post date:** [April 18, 2007, 7:19pm UTC](https://www.ruby-forum.com/t/soap-or-xml-rpc/92336/5 "2007-04-18T19:19:45Z")

</div>

Guest wrote:

> I need to use a third party web service and have a choice between a SOAP  
> or XML-RPC interface. I have never used either and was wondering what  
> people recommend in general and which is best supported/friendly with  
> Rails.
> 
> Thanks,  
> Bob

I second XML-RPC. The SOAP implementation in ruby has almost no  
documentation and the even the code is difficult to read. XML-RPC at  
least has some documentation, and I’m working on more.

jfmiller
