Creating araays as unbounded elements instead of "ArrayOf" elements

J

John Harvey

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="tns:phoneInfo" />
</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="tns:phoneInfo" />
</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!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,969
Messages
2,570,161
Members
46,705
Latest member
Stefkari24

Latest Threads

Top