views:

594

answers:

6

Are they just the same protocol or something different? I am just confused about it. Actually, I want to call a web service written in C# with ASP.NET by Python. I have tried XMLRPC but it seems just did not work.

So what is the actually difference among them? Thanks.

+1  A: 

There is a good explanation of different types of Web Service Protocols at http://en.wikipedia.org/wiki/List%5Fof%5Fweb%5Fservice%5Fprotocols

XML-RPC is the simplest to implement, but if you're looking at a service written in C# it's probably using SOAP.

Tim
+3  A: 

They are completely different protocols, you need to find out the protocol used by the web service you wish to consume and program to that. Web services is really just a concept XML-RPC, SOAP and REST are actual technologies the implement this concept. These implementations are not interoperable (without some translation layer).

All these protocols enable basically the same sort of thing, calling into remote some application over the web. However the details of how they do this differ, they are not just different names for the same protocol.

Tendayi Mawushe
A: 

Here is a good link about the difference between SOAP and XML-rpc

Also, take a look at this question on SO

Diego Dias
+3  A: 

All of them use the same transport protocol (HTTP).

XMLRPC formats a traditional RPC call with XML for remote execution.

SOAP wraps the call in a SOAP envelope (still XML, different formatting, oriented towards message based services rather than RPC style calls).

If you're using C#, your best bet is probably SOAP based Web Services (at least out of the options you listed).

Justin Niessner
+4  A: 

In order to call web service written in C#, you will need SOAP library that is able to consume WSDL (check it out in addition to all the useful terms mentioned here). Couple of the libraries i came across:

  • suds is a lightweight SOAP python client.
  • ZSI is more powerful library that also has WSDL consumption of complex types.
  • SOAPpy was good library. Unfortunately it was not updated since 2005-02-22, so i provided it here only for reference.

Python Web services page has more information and links on different related libraries.

artdanil
+1 for the resource links. Also wanted to point out that XML-RPC libraries do exist for C#, so while the vast majority of C# webservices are SOAP, it is possible to use XML-RPC.
Chris Pebble
A: 

xml-rpc: Its a mechanism to call remote procedure & function accross network for distributed system integration. It uses XML based message document and HTTP as transport protocol. Further, it only support 6 basic data type as well as array for communication.

SOAP: SOAP is also XML-based protocol for information exchange using HTPP transport protocol. However, it is more advanced then XML-RPC protocol. It uses XML formatted message that helps communicating complex data types accross distributed application, and hence is widely used now a days.

divyesh