O'Reilly logo

Real World XML Web Services: For VB and VB .NET Developers by Yasser Shohoud

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

9.6. Handling Object Arrays

Chapter 2 covered XML serialization and showed you examples of serializing custom objects and arrays to XML. In this section, we'll take it one step further and build a Web method that returns an array of objects. Then we'll build a client that calls this method and binds a data grid to the returned array.

Listing 9.21 shows a Customer class that has two properties: CompanyName and CustomerID.

Listing 9.21. An example Customer class (VBWSBook\Chapter9\Customer.vb)
 <XmlType([Namespace]:= _ "http://www.LearnXmlWS.com/customerorders/")> _ Public Class Customer Private mCompanyName As String Private mCustomerID As String <XmlAttributeAttribute()> _ Public Property CompanyName() As String Get Return mCompanyName End Get ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required