Click to See Complete Forum and Search --> : Jagged Arrays in WSDL


akiss
11-20-2006, 11:14 AM
Hi,

I'm working with .NET 1.1 and I'm trying to reach a web service. I got the WSDL to the service. I created the proxy classes with the WSDL.exe. Everything looks fine, but when i try a method which returns with a jagged array then i get back empty arrays. I debbuged the messages and noticed that the service sent the array data back properly, only the proxy classes could not parse the array from the xml response. The method did not give back any error just an empty array.

Has anyone happened to meet such problem before?

Here it is a simply description of the xsd types:

<xsd:complexType name="ResponseItem">
<xsd:sequence>
<xsd:element name="Elem1" type="xsd:string" />
<xsd:element name="Elem2" type="xsd:int" />
</xsd:sequence>
</xsd:complexType>

<xsd:complexType name="ResponseItems">
<xsd:sequence>
<xsd:element minOccurs="0" maxOccurs="unbounded" name="schedule" type="tns:ResponseItem" />
</xsd:sequence>
</xsd:complexType>

<xsd:element name="Response">
<xsd:complexType>
<xsd:sequence>
<xsd:element minOccurs="0" maxOccurs="unbounded" name="route" type="tns:ResponseItems" />
</xsd:sequence>
</xsd:complexType>


and the method in the wsdl:

[System.Web.Services.Protocols.SoapDocumentMethodAttribute("", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Bare)]
[return: System.Xml.Serialization.XmlArrayAttribute("Response",Namespace="http://.....xsd")]
[return: System.Xml.Serialization.XmlArrayItemAttribute("route", Namespace="http://..........xsd", IsNullable=false)]
[return: System.Xml.Serialization.XmlArrayItemAttribute("schedule", Namespace="http://......xsd", IsNullable=false, NestingLevel=1)]

public ResponseItem[][] getSomeArray( Query query)
{
...

}


Any help would be useful! Thanks in advance..
Agnes