A.4. Accessing the Originator Web ServiceThe Access Originator Web Service button accesses a web service that is hosted on the same computer that hosts the current application. You need to first add a web service project to the current solution. Follow these steps to do so:
To use the newly created web service, add a new Web Reference to the current project and enter "http://localhost/MyWebService" as the URL. Note: The steps to add a local web service reference to the current project are the same as that which I've outlined in the "Updating Unmanaged Components Using RegFree COM" section later in this PDF. Code the Access Originator Web Service button as follows: '=================================================== ' Access Originator Web Service '=================================================== Private Sub btnOriginatorWebService_Click( _ ByVal sender As System.Object, _ ByVal e As System.EventArgs) _ Handles btnOriginatorWebService.Click Dim ws As New localhost.Service MsgBox(ws.HelloWorld) End Sub |