4

I'm sorry to ask this question but I have spent hours trying to understand where each one of them fits in in a web service. I just can't wrap my head around what do I need to use to create a web service.

I know that web service can be .Net or Java or PHP based. Say I want to create a web service in .NET using C#. When do SOAP, XML-RPC or JSON come into picture?

Thank you!

wackytacky99
  • 614
  • 1
  • 14
  • 33
  • 1
    This is a very broad question and as such *may* end up being closed for not being specific enough for this site. It would be better if you reviewed the tag wiki entries for SOAP, XML-RPC and JSON and then asked more specific questions. – Rob Kielty Jun 30 '12 at 02:06

1 Answers1

5

JSON is a standard to represent human-readable data. It merely represents data, nothing more.

SOAP is a protocol specification for transmiting information and calling web services, and uses XML to encode it. SOAP works over HTTP (amogst other network protocols).

XML-RPC is another protocol, used for transmiting information and calling remote procedures. It doesn't run over HTTP, but is rather a different protocol, different port, etc.

So the main difference between SOAP and XML-RPC that the former wraps inside HTTP, while the latter does not. JSON is something completely different.

WhyNotHugo
  • 9,423
  • 6
  • 62
  • 70
  • Thanks. So if I create a .NET web service in C#, I'm guessing it will use SOAP for transmitting information and XML as the data format? – wackytacky99 Jun 30 '12 at 02:22
  • That's right. SOAP is also a well-defined standard that works across plenty of different languages, so your clients don't need to be C#, since they're basically XML files wrapped in HTTP. I belive the same stands true for XML-RPC. – WhyNotHugo Jun 30 '12 at 02:24
  • Great! Do I need to know anything about SOAP to write a web service? I saw some tutorials for creating .NET web services in Visual Studio but SOAP was never mentioned. – wackytacky99 Jun 30 '12 at 02:26
  • Nope, I've no idea to anything .NET related. If you can't find anything helpful, another question might be the answer. – WhyNotHugo Jun 30 '12 at 02:34