Consuming a Service Created with Web Matrix - Creating a client to the web service file
(Page 2 of 5 )
The TestWmatrixWsvc project is as shown, with the project node completely expanded, in Fig.4.
Fig.4
A web reference is added by right clicking the References node and choosing Add Web Reference. In the ensuing wizard, the web reference obtained from the previous section is inserted since this is available on the local host as shown in Fig.5 (the xml file is abbreviated). This brings the test.wsdl file shown in the solution explorer, and will be persisted in C:/Documents and Settings/computer user/VSWebCache/XPHTEK/TestWmatrixWsvc/Web References/localhost/test.wsdl. The soap: address is that of the test.asmx in the FindJay project.
Fig.5
The client may be tested now with the code in the Page_Load() event as shown in Fig.6. As the page is browsed, the sum of the hard coded values appears in the browser.
Fig.6

Next: Using the reference to the mini-web server >>
More Visual Basic.NET Articles
More By Jayaram Krishnaswamy