> This code attempts to send an array of arrays as a 2 dimensional array.
The
> problem is that .NET cannot handle multi-dimensional arrays (but can
handle
> jagged arrays). Can this boolean not be hard-coded but instead be
> configurable so it may have a chance of interoperating with .NET ?
>
.NET most certainly can handle multidimensional arrays--it supports both.
In general, you're probably better off building the complex type "by hand":
<complexType name="ArrayOfStringT">
<sequence minOccurs="0" maxOccurs="unbounded">
<element name="item" type="xsd:string" />
<sequence>
</complexType>
<complexType name="ArrayOfArrayOfStringT">
<sequence minOccurs="0" maxOccurs="unbounded">
<element name="item" type="tns:ArrayOfStringT" />
<sequence>
</complexType>
<element name="aoaos" type="tns:ArrayOfArrayOfStringT" />
For best results with respect to interoperability, write your WSDL first.
Ted Neward
Architect, UCDavis Account & Financial Services
http://www.javageeks.com
http://www.clrgeeks.com
-----Original Message-----
From: Cun Yong Tan [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 23, 2002 11:03
To: [EMAIL PROTECTED]
Subject: .NET Interop problem with jagged arrays
There seems to be an interop problem with .NET with jagged arrays
(array of arrays). I have a method exposed by Axis like so:
public String[][] getArrayOfStringArray(String[][] arg) {
return arg;
}
Here is the relevant part of the WSDL that was generated by Axis for the
String[][] type:
...
<complexType name="ArrayOfArrayOf_xsd_string">
<complexContent>
<restriction base="soapenc:Array">
<attribute ref="soapenc:arrayType" wsdl:arrayType="xsd:string[][]"/>
</restriction>
</complexContent>
</complexType>
<element name="ArrayOfArrayOf_xsd_string" nillable="true"
type="intf:ArrayOfArrayOf_xsd_string"/>
...
When I use .NET's WSDL.exe to generate the proxy, it generates a different
type than what is expected. (It generates String[][] as string[] instead of
string[][]).
public string[] getArrayOfStringArray(string[] arg) {
object[] results = this.Invoke("getArrayOfStringArray",
new object[] { arg});
return ((string[])(results[0]));
}
Has anyone run into this problem also ? Anyone knows of a workaround
(wsdl written differently etc)
There may be potentially be another problem. This one is in Axis's
ArraySerializer.java code. In ArraySerializer.java,
there is a hard-coded boolean (this is beta2 code) named enbale2Dim:
// Discover whether array can be serialized directly as a
two-dimensional
// array (i.e. arrayType=int[2,3]) versus an array of arrays.
...
boolean enable2Dim = true; // Enabled 2-Dim processing
This code attempts to send an array of arrays as a 2 dimensional array. The
problem is that .NET cannot handle multi-dimensional arrays (but can handle
jagged arrays). Can this boolean not be hard-coded but instead be
configurable so it may have a chance of interoperating with .NET ?
_________________________________________________________________
Send and receive Hotmail on your mobile device: http://mobile.msn.com