Better Software - March 2008 - (Page 26) Figure 1: Web services consumer-producer setup In addition, it produces the WSDL file that defines the Web service interface. This file provides all the necessary information for the consumer, SOAPSonar, to send SOAP requests to the target Web service. SOAPSonar consumes and interprets the WSDL-based API published by the producer and invokes the Web service. BUILDING A SIMPLE WEB SERVICE Follow these steps to build your first Web service: 1. Download and install .NET WebMatrix from www.asp.net/Webmatrix/download.aspx?tabindex=4. 2. Go to: Start > All Programs > Microsoft ASP .NET Web Matrix > ASP .NET Web Matrix. 3. You will be prompted with the screen shown in figure 2. Fill in the information as shown. Select Web Services in the left panel and the Simple template in the right panel. You can create a C:\WebServices folder for your file location. Enter MathWS.asmx as the filename and pick C# as the language that the wizard will use to autogenerate the code. Also, declare the class as MathWS, and the namespace as math. 4. With the values selected and entered in step 3, WebMatrix auto-generates a Web service for you with the code in figure 3. 5. Click the Start button in the IDE and it will prompt you to start the Web application on port 9090, as shown in figure 4. Make sure your local firewall is turned off. 6. A Web browser with operation Add(int a, int b) will appear. You can click this and start experimenting with your first Web service. You are now ready to test your first Web service and determine its functional, performance, and interoperability characteristics. In the following sections, you will learn specific Web services-testing techniques. Figure 2: Inputs for generating a simple Web service MathWS.asmx REQUIRED SOFTWARE AND SETUP To illustrate building and testing your first Web service, one with a single operation Add(int a, int b), the following components are required: • Microsoft .NET WebMatrix: This installer includes an IDE for building Web services and a lightweight Web server. • Crosscheck Networks SOAPSonar Enterprise Edition: This is a .NET-based SOAP client used for comprehensive Web services testing. Both components can be installed on a Windows 2000/ XP/2003 machine with moderate resources. Figure 1 shows a typical Web service deployment with a consumer-producer interaction model. The producer is the .NET WebMatrix server that supplies a Web service with the Add(int a, int b) operation that applications can invoke, typically remotely, over HTTP(S). 26 BETTER SOFTWARE MARCH 2008 TEST CLIENT SETUP SOA testers must ensure that Web services deployed within www.StickyMinds.com http://www.asp.net/Webmatrix/download.aspx?tabindex=4 http://www.StickyMinds.com
Table of Contents Feed for the Digital Edition of Better Software - March 2008 Better Software - March 2008 Contents Mark Your Calendar Contributors eLightenment Technically Speaking Code Craft Test Connection Management Chronicles Cover Story: Breaking Ground On SOA Software Development Worst Practices Mind the Gap Product Announcements 10 Things You Might Not Know About... The Last Word Ad Index Better Software - March 2008 Better Software - March 2008 - (Page Intro) Better Software - March 2008 - Better Software - March 2008 (Page Cover1) Better Software - March 2008 - Better Software - March 2008 (Page Cover2) Better Software - March 2008 - Better Software - March 2008 (Page 1) Better Software - March 2008 - Better Software - March 2008 (Page 2) Better Software - March 2008 - Contents (Page 3) Better Software - March 2008 - Mark Your Calendar (Page 4) Better Software - March 2008 - Mark Your Calendar (Page 5) Better Software - March 2008 - Contributors (Page 6) Better Software - March 2008 - Contributors (Page 7) Better Software - March 2008 - eLightenment (Page 8) Better Software - March 2008 - eLightenment (Page wp1) Better Software - March 2008 - eLightenment (Page wp2) Better Software - March 2008 - eLightenment (Page 9) Better Software - March 2008 - eLightenment (Page 10) Better Software - March 2008 - eLightenment (Page 11) Better Software - March 2008 - eLightenment (Page 12) Better Software - March 2008 - Technically Speaking (Page 13) Better Software - March 2008 - Code Craft (Page 14) Better Software - March 2008 - Code Craft (Page 15) Better Software - March 2008 - Code Craft (Page 16) Better Software - March 2008 - Code Craft (Page 17) Better Software - March 2008 - Test Connection (Page 18) Better Software - March 2008 - Test Connection (Page 19) Better Software - March 2008 - Management Chronicles (Page 20) Better Software - March 2008 - Management Chronicles (Page 21) Better Software - March 2008 - Management Chronicles (Page 22) Better Software - March 2008 - Management Chronicles (Page 23) Better Software - March 2008 - Cover Story: Breaking Ground On SOA (Page 24) Better Software - March 2008 - Cover Story: Breaking Ground On SOA (Page 25) Better Software - March 2008 - Cover Story: Breaking Ground On SOA (Page 26) Better Software - March 2008 - Cover Story: Breaking Ground On SOA (Page 27) Better Software - March 2008 - Cover Story: Breaking Ground On SOA (Page 28) Better Software - March 2008 - Cover Story: Breaking Ground On SOA (Page 29) Better Software - March 2008 - Cover Story: Breaking Ground On SOA (Page 30) Better Software - March 2008 - Cover Story: Breaking Ground On SOA (Page 31) Better Software - March 2008 - Software Development Worst Practices (Page 32) Better Software - March 2008 - Software Development Worst Practices (Page 33) Better Software - March 2008 - Software Development Worst Practices (Page 34) Better Software - March 2008 - Software Development Worst Practices (Page 35) Better Software - March 2008 - Software Development Worst Practices (Page 36) Better Software - March 2008 - Software Development Worst Practices (Page 37) Better Software - March 2008 - Mind the Gap (Page 38) Better Software - March 2008 - Mind the Gap (Page 39) Better Software - March 2008 - Mind the Gap (Page 40) Better Software - March 2008 - Mind the Gap (Page 41) Better Software - March 2008 - Mind the Gap (Page 42) Better Software - March 2008 - Mind the Gap (Page 43) Better Software - March 2008 - Mind the Gap (Page 44) Better Software - March 2008 - Product Announcements (Page 45) Better Software - March 2008 - 10 Things You Might Not Know About... (Page 46) Better Software - March 2008 - The Last Word (Page 47) Better Software - March 2008 - Ad Index (Page 48) Better Software - March 2008 - Ad Index (Page Cover3) Better Software - March 2008 - Ad Index (Page Cover4)
For optimal viewing of this digital publication, please enable JavaScript and then refresh the page. If you would like to try to load the digital publication without using Flash Player detection, please click here.