Passing Complex Types

ASP.NET makes it exceptionally easy to pass complex types as Web Service arguments and return values. If the complex type is passed as a method argument, ASP.NET will only be able to support SOAP messaging. This is because no definition exists to describe how to pass complex types as arguments via HTTP/GET or HTTP/POST. You can return complex types via these methods. So that we can see the immediate results of our coding via Internet Explorer, we will return the type.

Many people who learn of this functionality are often surprised to find out that when a value is passed via a Web Service, only the publicly visible fields are serialized. The receiver of the object has no access to any methods that the object may expose. Instead, ...

Get Creating and Consuming Web Services in Visual Basic® 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.