Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Services > Creating araays as unbounded elements instead of "ArrayOf" elements

Reply
Thread Tools

Creating araays as unbounded elements instead of "ArrayOf" elements

 
 
John Harvey
Guest
Posts: n/a
 
      01-09-2006
I have been struggling with the following: I want to create a class
that contains an array of some user-defined type. so I have the
following vb code:

Public Class Communications
Public PhoneInfo() As ACORD.PhoneInfo
End Class

Public Class PhoneInfo
Public PhoneNumber As String
Public PhoneTypeCd As String
End Class

The problem is when I generate the WSDL I get:


<s:complexType name="Communications">
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="PhoneInfo"
type="tns:ArrayOfPhoneInfo" />
</s:sequence>
</s:complexType>
<s:complexType name="ArrayOfPhoneInfo">
<s:sequence>
<s:element minOccurs="0" maxOccurs="unbounded" name="PhoneInfo"
nillable="true" type="tnshoneInfo" />
</s:sequence>
</s:complexType>
<s:complexType name="PhoneInfo">
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="PhoneNumber"
type="s:string" />
<s:element minOccurs="0" maxOccurs="1" name="PhoneTypeCd"
type="s:string" />
</s:sequence>
</s:complexType>

But I was hoping for:

<s:complexType name="Communications">
<s:sequence>
<s:element minOccurs="0" maxOccurs="unbounded" name="PhoneInfo"
type="tnshoneInfo" />
</s:sequence>
</s:complexType>
<s:complexType name="PhoneInfo">
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="PhoneNumber"
type="s:string" />
<s:element minOccurs="0" maxOccurs="1" name="PhoneTypeCd"
type="s:string" />
</s:sequence>
</s:complexType>

Any help would be greatly appreciated!

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
The usage of <xs:choice maxOccurs="unbounded"> mavis XML 2 06-01-2006 05:02 PM
The usage of <xs:choice maxOccurs="unbounded"> Mavis Java 0 06-01-2006 06:12 AM
How to skip the unbounded column...? new bie Maheshkumar.R ASP .Net Datagrid Control 1 06-16-2005 02:10 PM
<xs:all> with unbounded elements nosferatu_1_1@yahoo.com XML 2 02-23-2005 05:30 PM
Unbounded Datagrid Fabiano ASP .Net Web Controls 3 05-11-2004 01:21 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57