Accessing the Originator Web Service
The 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:
Go to File -> Add -> New Web Site.
Select the ASP.NET Web Service template and select HTTP as the Location.
Name the project "http://localhost/MyWebService" and click OK.
Right-click on the newly created web service in Solution Explorer and select Build Web Site.
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.
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 SubBecome an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access