Invoking Members from the Service
To invoke service members, you need to create an instance of the proxy class, which in our example is named BookClient.BookServiceReference.BookServiceClient
. Creating an instance of the class can establish a connection to the WCF service and give you access to public members. Continuing with the previous example, the client application could have an instance of the Book
class and invoke the ValidateBook
method for checking whether the Book
instance is correct according to our needs. The code in Listing 37.5 shows how to accomplish this.
Imports BookClient.BookServiceReferenceModule Module1 Sub Main() 'Creates ...
Get Visual Basic 2015 Unleashed now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.