Creating a VB.NET Client for a ColdFusion Web Service - Creating the Client User Interface
(Page 4 of 4 )
On the WebClient.aspx page, to the design view add a textbox which picks up the argument that is passed to the web service. You will also need a button to call the web service when clicked, and a Required Field Validator so that user is prompted to type in text, if he or she did not do so.
Fig.6
Fig.7 shows the code being written and the intellisense coming to the rescue. Observe the pop-up right after typing in "myCFsvc." inside "Response.Write()".
Fig.7
Fig.8 shows the completed code. Note that the reference to the proxy must be imported using the imports statement at the very top of the code a shown.
Fig.8

Browsing the Client
The rest is history. Right click the WebClient.aspx file in the Solution Explorer and choose to view it in your default browser. Then you will see the following display when you type text into the text box and click the button. The button click event called the web service via the proxy after passing what is typed into the text box. The service used the argument sent, and after processing sent the result to the client, which the client rendered to the display as seen in Fig.9
Fig.9

Summary
Interoperability is the goal and this tutorial touches upon a small fraction of this aspect. What has been shown in the last two tutorials are that web services created in ColdFusion (which are Java based) can be consumed by a Microsoft .NET Visual Studio created client, and that a Microsoft Visual Studio created Web Service (which is .NET based) can be consumed by a client application written in ColdFusion. Relatively speaking, the web services are interoperable between Java and .NET programming languages, as seen in these two tutorials in the Windows operating system.
| DISCLAIMER: The content provided in this article is not warranted or guaranteed by Developer Shed, Inc. The content provided is intended for entertainment and/or educational purposes in order to introduce to the reader key ideas, concepts, and/or product reviews. As such it is incumbent upon the reader to employ real-world tactics for security and implementation of best practices. We are not liable for any negative consequences that may result from implementing any information covered in our articles or tutorials. If this is a hardware review, it is not recommended to open and/or modify your hardware. |