Prev | Current Page 145 | Next

Jayaram Krishnaswamy

"Beginners Guide to SQL Server Integration Services Using Visual Studio 2005"

asmx file to
the website, as shown in the following screenshot.
6. Double-click the ForSsis.vb file and substitute the default method shown in
the next listing by a new method, so that the complete listing of ForSsis.vb
is as shown in the following code:
_
Public Function HelloWorld() As String
Return ???Hello World"
End Function
Imports System.Web
Imports System.Web.Services
Imports System.Web.Services.Protocols
_
_
DesignerGenerated()> _
Public Class ForSsis
Inherits System.Web.Services.WebService
_
Public Function Miles_to_Km(ByVal a As Double) As Double
Return (a * 1.6093)
End Function
End Class
Chapter 14
[ 217 ]
The file ForSsis.vb has the VB code for the web service and this contains the web
method. When the client accesses the web service, the function Miles_To_Km gets
called using the argument (Miles) provided by the web service client, or simply the
client. The return value of this function is the value of miles in kilometers.
The web service can be tested by browsing the file ForSsis.asmx, which displays the
following information. Only a part of the screen is displayed.
You can invoke the web service by clicking on the Miles_to_Km hyperlink and
providing an argument to the function in the window that pops-up.
Step 3: Create a WSDL File
The Service Description hyperlink points the URL reference (http://localhost/
SSIS_SVC/ForSsis.


Pages:
133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157
Jennifer Lopez Hugh Masekela Luniz DC++ Ultra Speed Ky-Mani Marley