What is the easiest way to create a web service with XML response?
- Use WCF to create the web service? (seems really complicated)
- If i want to use WCF to create my web service, where do I start?
What is the easiest way to create a web service with XML response?
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.
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
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: