Building Simple Output Web Services

Now that you are familiar with what a Web service is, and the standards and protocols that are usable by Web services, it is time to get your hands dirty by building some Web services. In the following section, I will show you how to build a simple Web service (the classic “Hello World” example… you didn't think you could get through a programming book without writing Hello World, did you?). You will build on the concepts learned while building a simple Web service, and build bigger, more complex Web services.

WebMethod

Building a basic Web service is really no different than creating a custom class and exposing public methods. Listing 14.1 shows the code to create a HelloWorld class (not a Web service, yet). ...

Get Programming Data-Driven Web Applications with ASP.NET 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.