Special Edition Using Microsoft Office Access 2003
Microsoft's .NET WebService Studio (WSS) is an extraordinarily useful application for testing your own and others' Web services. The primary reason that this section is located midway through the chapter is the time and effort to prepare for its use if you haven't installed the prerequisites to run .NET applications. Another reason is WSS's capability to display the IXMLDOMNode property values that are described in the four preceding sections. Basic knowledge of the IXMLDOMNodeList and IXMLDOMNodes objects makes WSS's SOAP response data display meaningful. WSS consists of a single tabbed .NET Windows form that lets you send SOAP request messages to a service, inspect the full text of the request and response messages, view the service's WSDL document, and read the C# proxy code. Like WSR, WSS generates the client proxy for the service. WSS, however, provides text boxes to supply the service's parameter values. Tip WSS is an essential tool for testing SQLXML Web services that you develop in the following sections. If you intend to make your SQL Server data accessible to Web services consumers, your investment to install WSS will be well rewarded.
Installing .NET WebService Studio and its Prerequisites
Following are the steps required to install and run WSS:
Tip Microsoft's GotDotNet site offers several additional tools for Web service development, plus XML utilities. One of the most interesting XML utilities is an online XSD schema inference engine at http://apps.gotdotnet.com/xmltools/xsdinference/. Supply the path to an XML file and Microsoft XSD Inference 1.0 generates its XSD schema. You can read more about XSD Inference 1.0 at http://www.fawcette.com/xmlmag/2002_11/online/xml_rjennings_11_11_02/.
Running WSS with a Public Web Service
Here's how to give WSS a test drive, using the Alpha service as an example:
Clicking the Request/Response tab displays the full text of the SOAP request and response messages in two text boxes (see Figure 31.13). If the Web service requires Basic (clear-text) authentication, provide the credentials in the BasicAuthPassword and BasicAuthUserName text boxes. For services on an intranet that require Windows (NTLM) authentication, you can pass your logon credentials to the service by changing UseDefaultCredential's value to True. To use NTLM authentication, you also must set the AutoRedirect and KeepAlive HTTP properties to True. Figure 31.13. Code behind WSS's form intercepts the serialized SOAP request and response messages and displays the XML contents in two text boxes.
The WSDLs & Proxy page has a tree view list that lets you display the contents of the WSDL document, XSD schemas for the response document, if present, and the C# code for the Web service proxy, and WSS's client code that invokes the proxy. Selecting the Proxy and scrolling to the proxy for the first Web method lets you compare the C# code for invoking the method with the WSR clsws_ServiceName's wsm_FunctionName(Parameters...) As MSXML2.IXMLDOMNodeList VBA function (see Figure 31.14). WSS returns the SqlRowSet object as a .NET System.Data.DataSet type, which simplifies populating a DataGrid control in a .NET Windows or Web form (refer to Figure 31.11). The System.Xml.XmlNode type for SqlXml rows corresponds to MSXML2's IXMLDOMNode type. Figure 31.14. The C# code for the Alpha Web service proxy is much more complex than that generated by WSR. The WSS proxy works, however, while the original WSR proxy fails.
|