Section A.4. Accessing the Originator Web Service


A.4. 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 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 




Use ClickOnce to Deploy Windows Applications2006
Use ClickOnce to Deploy Windows Applications2006
ISBN: N/A
EAN: N/A
Year: 2005
Pages: 38

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net