tags:

views:

241

answers:

0

I'm designing a system based on .NET platform, which will interact with Java EE application. I have an .xsd file, which i got from Java guys and now we are trying to change it in a way that will be suitable for my .NET system to consume.

I want to get a .NET-client in "unwrapped" style in the end, and everything goes fine except one point. We have specified arrays in the .xsd using ArrayOfXxx convention.

<xsd:complexType name="ArrayOfBillInfo">
    <xsd:sequence>
        <xsd:element name="BillInfo" minOccurs="0" type="tns:BillInfo" maxOccurs="unbounded"/>
    </xsd:sequence>
</xsd:complexType>
<xsd:complexType name="ArrayOfstring">
    <xsd:sequence>
        <xsd:element name="string" minOccurs="0" maxOccurs="unbounded" type="xsd:string" nillable="true" />
    </xsd:sequence>
</xsd:complexType>

In this way, svcutil doesn't generate a separate type for ArrayOfBillInfo, just uses BillInfo[] as a method parameter and that's what i want to achieve. But no matter how hard i try, it always generates:

public class ArrayOfstring : System.Collections.Generic.List<string>
{
}

Usually svcutil generates for value type arrays something like:

<xs:complexType name="TestContract">
<xs:sequence>
  <xs:element minOccurs="0" name="StringArray" nillable="true" xmlns:q1="http://schemas.microsoft.com/2003/10/Serialization/Arrays" type="q1:ArrayOfstring" />
</xs:sequence>

So, is there any way to introduce my own string array in xsd and make svcutil not to generate a separate type for it?