Consuming Data in a Web Service
After the Web service has been built and exposed on the Web server, a client will typically call it by building a SOAP message and sending it to the server. However, Web services created by VS .NET by default also can be called using an HTTP-GET or POST. In this way, clients that don't support SOAP can still invoke the Web service. For example, a client can issue the following HTTP-GET to call the GetTopSellers method of the Catalog Web service:
GET /Catalog.asmx/GetTopSellers?daysOut=value HTTP/1.1
Host: www.computebooks.com
The result will be an XML document that includes the schema of the DataSet along with the serialized DiffGram encoded as follows:
HTTP/1.1 200 OK Content-Type: text/xml; charset=utf-8 Content-Length: ...
Get Sams Teach Yourself ADO.NET in 21 Days now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.