tags:

views:

139

answers:

0

Hi,

i've got this servicedefinition:

[DataContract]
public class Test
{

    [DataMember(IsRequired = true)]
    public TestArray[] array;
}

[DataContract]
public class TestArray
{
   public DateTime? field1;
   public string field2;
}

which WCFs Metadataprovider ( http://localhost/Test?wsdl ) generates as:

<xs:complexType name="ArrayOfTestArray">
  <xs:sequence>
  <xs:element minOccurs="0" maxOccurs="unbounded" name="array" nillable="true" type="tns:TestArray"/>
  </xs:sequence>
</xs:complexType>

<xs:complexType name="OpenBalanceInvoice">
  <xs:sequence>
    <xs:element name="field1" nillable="true" type="xs:dateTime"/>
    <xs:element name="field2" nillable="true" type="xs:string"/>
  </xs:sequence>
</xs:complexType>

The problem is ( even if it works when svcutil.exe magically generates a client from it ) that the Metadataprovider actually creates a new object ( ArrayOfTestArray ) which is not existent in the code it was generated from

Problem: When i try to generate a JavaClient from this WSDL, it - of course - doesn't recognize that this "ArrayOf" object isn't a "real" object at all and the Java class looks something like:

class Test
{
   public ArrayOfTestArray array;
}

class ArrayOfTestArray 
{
   public TestArray[] array;
}
public class TestArray
{
   public DateTime? field1;
   public string field2;
}

So, i don't want this additional class of course... any suggestions?

Thanks!