I need to create a web service that returns XML data to some of my clients.
Where ever I google for web service tutorials, 80% talks about using SOAP.
My question is just this: Can any client read the fetched data as ordinary XML?
Are there alternatives for SOAP?
REST is a lightweight alternative to SOAP. It uses existing HTTP methods like GET, POST, PUT, DELETE. Conceptually, a URL identifies a resource on your server, and the HTTP method defines the action to be performed.
REST is an architecture style, so it’s flexible in terms of how you implement it. The architecture is just a guideline where an application is considered RESTful if it meets the defined characteristics of a REST web service.
JSON is commonly used as the transport, instead of XML. The advantage is that JavaScript can instantly parse JSON, and many server side technologies have libraries for deserializing JSON into an object. While JSON is recommended, you can use any content type with REST, including XML.
See the Wikipedia article on REST for more details.
Examples:
Get Car class for Ford Thunderbird
Insert a vehicle in the collection