Creating a VB.NET Client for a ColdFusion Web Service - Description of the ColdFusion Web Service
(Page 2 of 4 )
The complete description of the web service coded using ColdFusion was described in the earlier tutorial. Here is a brief description of the service containing some essential information.
The following ColdFusion function was converted into a web service in the previous tutorial.
<cffunction name="WelcomeMsg" returntype="string">
<cfargument name="name" type="string" required="yes">
<cfreturn "<h3><font color='blue'>Welcome to my Web Service Site</font></h3> " & arguments. name &"! " & "What would you like to do?">
</cffunction>
<cfoutput>
#WelcomeMsg("Jay")#
</cfoutput>
This function requires a string and it processes the string by concatenating ! What would you like to do? to it. The function has a method, WelcomeMsg(), which eventually become the web service's method. In order to convert this function a ColdFusion component was constructed, which has the file name justFunction.cfc. This is the component that becomes discovered by the wsdl.
Step 1: Create a ASP.NET ApplicationFrom File -->New-->Project, open the various projects that can be created in MS VB.NET 2003 IDE. Choose to create an ASP.NET Web Application which is called ColdFusionNetClient. This adds a WebForm1. Delete this and add a new web form WebClient.aspx as shown in Fig.1.
Fig.1

Next: Creating a Web Reference >>
More Visual Basic.NET Articles
More By Jayaram Krishnaswamy