wsdl.exe and Two-Dimensional Arrays

  • Thread starter Thread starter Erik Klein
  • Start date Start date
E

Erik Klein

I am attempting to use wsdl.exe to generate a Web Service Client in C#
from a valid WSDL file generated by Apache Axis.

There appear to be a problem recognizing a 2-Dimensional Array that
did not present a problem for the Apache Axis Toolkit or Java Web
Services Developer Pack Toolkit when they generated the client code.

"GridField" represents a 2-Dimensional Array of "Field". Here is a
snippet from the WSDL describing it.

<complexType name="GridField">
<complexContent>
<extension base="tns4:Field">
<sequence>
<element name="fields" nillable="true"
type="impl:ArrayOfArrayOf_tns4_Field"/>
</sequence>
</extension>
</complexContent>
</complexType>

<complexType name="ArrayOfArrayOf_tns4_Field">
<complexContent>
<restriction base="soapenc:Array">
<attribute ref="soapenc:arrayType"
wsdl:arrayType="tns4:Field[][]"/>
</restriction>
</complexContent>
</complexType>

<complexType abstract="true" name="Field">
<sequence>
<element name="name" nillable="true" type="xsd:string"/>
<element name="metaData" nillable="true" type="tns5:MetaData"/>
</sequence>
</complexType>


When wsdl.exe creates the Web Service Client code in C#, it generates
the following:
[System.Xml.Serialization.SoapTypeAttribute("GridField",
"urn:fields.axis.webservices.sparta.com")]
public class GridField : Field {
public Field[] fields; // Note: Only 1 Dimensional Array
}

I then go in and modify it to be "Field[][]" and all works fine.

Is there an explanation / workaround for this?
 
Back
Top