Appendix D: Visual Basic.NET

Creating a VB.NET Client

To create a VB.NET consumer you need to create the proxy code. Just as in C#, you can either add a Web reference through VS.NET or use the WSDL.exe tool to create the proxy. The commands are exactly the same as for C#, but with the WSDL.exe tool, you need to specify Visual Basic as the language you want the proxy in.


Even if the proxy gets created with C# code and then compiled with the C# compiler, you can still include and use the proxy with VB.NET. This is one of the benefits of the Common Language Runtime.

Like C#, Visual Basic.NET has the ability to create ASP.NET pages, command line applications, and Windows GUI tools—all of which can create a proxy and then access the SimpleStockQuote example with the following code.

  Dim localhostWebservice As Xplatform   Double result = localhostWebservice.GetTestQuote("C")

Review Chapter 6 to get an idea of the types of consumers Visual Basic.NET can support. Any consumer you can create in C# can also be created in VB.NET.

Cross-Platform Web Services Using C# and Java
Cross-Platform Web Services Using C# & JAVA (Charles River Media Internet & Web Design)
ISBN: 1584502622
EAN: 2147483647
Year: 2005
Pages: 128 © 2008-2017.
If you may any questions please contact us: