Object arrays in web service (SOAP & WSDL)

Ville Mattila

New member
Joined
Jan 11, 2006
Messages
1
Programming Experience
5-10
Hello,

I am getting to know about wonderful .NET Web Service features with VB.NET. For some reason, I can't get VB.NET to understand an array of objects defined in WSDL file.

If you take a look on following url: http://www.nonplus.net/geek/samples/books.php?wsdl you can see that there are ChapterArray, Book and BookArray types defined. I attach the type definition code below. If I make a web reference to the url above in my VB.NET, ChapterArray and BookArray won't come available. Why? Should the be defined in another way in WSDL?

Thanks,
Ville

---

[FONT=Courier New,Courier,Monospace]<types>[/FONT]
[FONT=Courier New,Courier,Monospace]−[/FONT]
[FONT=Courier New,Courier,Monospace] <xsd:schema targetNamespace="http://books.org/Books">[/FONT]
[FONT=Courier New,Courier,Monospace]<xsd:import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>[/FONT]
[FONT=Courier New,Courier,Monospace]<xsd:import namespace="http://schemas.xmlsoap.org/wsdl/"/>[/FONT]
[FONT=Courier New,Courier,Monospace]−[/FONT]
[FONT=Courier New,Courier,Monospace] <xsd:complexType name="Chapter">[/FONT]
[FONT=Courier New,Courier,Monospace]−[/FONT]
[FONT=Courier New,Courier,Monospace] <xsd:all>[/FONT]
[FONT=Courier New,Courier,Monospace]<xsd:element name="title" type="xsd:string"/>[/FONT]
[FONT=Courier New,Courier,Monospace]<xsd:element name="page" type="xsd:int"/>[/FONT]
[FONT=Courier New,Courier,Monospace]</xsd:all>[/FONT]
[FONT=Courier New,Courier,Monospace]</xsd:complexType>[/FONT]
[FONT=Courier New,Courier,Monospace]−[/FONT]
[FONT=Courier New,Courier,Monospace] <xsd:complexType name="ChapterArray">[/FONT]
[FONT=Courier New,Courier,Monospace]−[/FONT]
[FONT=Courier New,Courier,Monospace] <xsd:complexContent>[/FONT]
[FONT=Courier New,Courier,Monospace]−[/FONT]
[FONT=Courier New,Courier,Monospace] <xsd:restriction base="SOAP-ENC:Array">[/FONT]
[FONT=Courier New,Courier,Monospace]<xsd:attribute ref="SOAP-ENC:arrayType" wsdl:arrayType="tns:Chapter[]"/>[/FONT]
[FONT=Courier New,Courier,Monospace]</xsd:restriction>[/FONT]
[FONT=Courier New,Courier,Monospace]</xsd:complexContent>[/FONT]
[FONT=Courier New,Courier,Monospace]</xsd:complexType>[/FONT]
[FONT=Courier New,Courier,Monospace]−[/FONT]
[FONT=Courier New,Courier,Monospace] <xsd:complexType name="Book">[/FONT]
[FONT=Courier New,Courier,Monospace]−[/FONT]
[FONT=Courier New,Courier,Monospace] <xsd:all>[/FONT]
[FONT=Courier New,Courier,Monospace]<xsd:element name="author" type="xsd:string"/>[/FONT]
[FONT=Courier New,Courier,Monospace]<xsd:element name="title" type="xsd:string"/>[/FONT]
[FONT=Courier New,Courier,Monospace]<xsd:element name="numpages" type="xsd:int"/>[/FONT]
[FONT=Courier New,Courier,Monospace]<xsd:element name="toc" type="tns:ChapterArray"/>[/FONT]
[FONT=Courier New,Courier,Monospace]</xsd:all>[/FONT]
[FONT=Courier New,Courier,Monospace]</xsd:complexType>[/FONT]
[FONT=Courier New,Courier,Monospace]−[/FONT]
[FONT=Courier New,Courier,Monospace] <xsd:complexType name="BookArray">[/FONT]
[FONT=Courier New,Courier,Monospace]−[/FONT]
[FONT=Courier New,Courier,Monospace] <xsd:complexContent>[/FONT]
[FONT=Courier New,Courier,Monospace]−[/FONT]
[FONT=Courier New,Courier,Monospace] <xsd:restriction base="SOAP-ENC:Array">[/FONT]
[FONT=Courier New,Courier,Monospace]<xsd:attribute ref="SOAP-ENC:arrayType" wsdl:arrayType="tns:Book[]"/>[/FONT]
[FONT=Courier New,Courier,Monospace]</xsd:restriction>[/FONT]
[FONT=Courier New,Courier,Monospace]</xsd:complexContent>[/FONT]
[FONT=Courier New,Courier,Monospace]</xsd:complexType>[/FONT]
[FONT=Courier New,Courier,Monospace]</xsd:schema>[/FONT]
[FONT=Courier New,Courier,Monospace]</types>[/FONT]
 
Back
Top