views:

52

answers:

3

What is the easiest way to create a web service with XML response?

  1. Use WCF to create the web service? (seems really complicated)
  2. If i want to use WCF to create my web service, where do I start?
A: 

The easiest way to create a web service with an XML response is, no kidding, to put an XML file on a standard web server and serve it as a static file.

I'm guessing you want something more flexible than that, though...

You've got several options, and WCF is at the more complex (but flexible) end of the spectrum. First question: what's your client? Are you writing it? Do you want to write a web service that can be consumed by other clients?

Do you want to use REST -- i.e. plain-old-XML (POX) over plain-old-HTTP? XML-RPC? SOAP?

WCF supports all of these, so this really depends on which clients you want to support.

Update: If you want to support XML-RPC, you could do worse than start with this implementation of XML-RPC for WCF by Clemens Vasters. I asked a question about this here.

Roger Lipscombe
I understand that WCF supports all of these, and its flexible, but its very complicated, alot more complicated than simply creating a SOAP web service.
K001
I just want to create a XML-RPC web service, no SOAP (it has too much overhead).
K001
See my update about XML-RPC on WCF.
Roger Lipscombe
A: 

Few links are available in this article. Hope they will help you -

http://social.msdn.microsoft.com/Forums/en/wcf/thread/b082d6de-d1e9-4e51-a0ab-0fe98d7003e6

Sachin Shanbhag
A: 

In your case, I would definitely use WCF with the REST binding (webHttpBinding) - and I would disagree about it being complicated to learn.

Check out these resources to get started:

marc_s