SOAP and WSDL are extremely complex standards that have many implementations that support different subsets of standards. SOAP does not map very well with a simple interface of external functions in the same way as XML-RPC . Instead, you should understand XML namespaces, envelopes, headers, WSDLs, XML schemas, etc., in order to create the right SOAP messages. All you have to do to call the XML-RPC service is to define the endpoint and call the method on it. For example, in Ruby:
require 'xmlrpc/client' server = XMLRPC::Client.new2("http://example.com/api") result = server.call("add", 1, 2)
In addition to XML-RPC, there are other methods that can also be much simpler and easier, such as plain XML or JSON . HTTP (often called REST , although this implies some other design considerations). The advantage of something like XML or JSON over HTTP is that it is easy to use from JavaScript, or even just a dumb web page with form submission. It can also be easily written from the command line with tools such as curl . It works with almost any language because HTTP libraries, XML libraries, and JSON libraries are available almost everywhere, and even if the JSON parser is not available, it is very easy to write.
Edit: I have to clarify what I mean by how conceptually heavyweight SOAP, as opposed to heavy weight, is in terms of the raw amount of data. I think that the raw amount of data is less important (although it can add up quickly if you need to process many small requests), and how conceptually heavy it is very important, because it means that there are many more places where something can go so where there might be incompatibility, etc.
Brian Campbell Mar 24 '09 at 4:29 2009-03-24 04:29
source share