Browse DevX
Sign up for e-mail newsletters from DevX


Take Advantage of SQLXML with ASP.NET  : Page 2

Use SQLXML's Web services to access XML data directly from your ASP.NET applications.




Building the Right Environment to Support AI, Machine Learning and Deep Learning

Figure 2. Add the Controls: ASP.Net Web Form client application for MyWebService.
Constructing the ASP.NET client
After configuring the SQLXML Web service, you need to develop a client application to access the service and perform any of its operations. First, create a new C# or VB.Net ASP.NET Web application and name it WebServiceClient. You'll need to add three controls to the default Web Form: a Button with the ID btnRequest, and two TextBox controls, one with the ID txtOrderID and the other with the ID txtResponse. Set the TextMode property of the txtResponse TextBox control to MultiLine to support the XML response data from your Web service. The form should look similar to Figure 2.
Figure 3. Add a Reference: Add the MyWebService reference to the ASP.Net application.
After adding the controls, you'll need to add a reference to the Web service you've just created. To do that, click on the References folder in the Solution Explorer window in VS.NET, right-click on the References folder, and select the Add Web Reference menu option (see Figure 3).

The URL you select references the Web service you created previously. Note that I've used the server name localhost, which references my local instance of IIS, the virtual directory path is nwind, for the Northwind database virtual directory, and the Web service name is MyWebService. If you're not using a local server, you'll need to substitute your server's name or IP address in the URL.

Comment and Contribute






(Maximum characters: 1200). You have 1200 characters left.



Thanks for your registration, follow us on our social networks to keep up-to-date