It should be possible. We've had some interop problems with .NET and arrays, but the symptoms were different than those you described. A little more information would be helpful:
Version of Axis
Wire dump
The WSDL
Are the elements that go on the wire namespace-qualified? You might want to try inserting 'elementFormDefault="qualified"' in the schema definition in the types section of your WSDL and see if you have more success.
Hope this helps,
David
-----Original Message-----
From: McCaslin Orion [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, December 31, 2002 2:32 PM
To: [EMAIL PROTECTED]
Subject: Interoperability Axis with .NET (C#)
Hi,
Web Services issue:
----------------------------------------------------------------------------
-------------
Anyone know if it is possible to pass an array of Complex Objects from a
Java-based system to a .Net(C#) system?
----------------------------------------------------------------------------
-------------
I did this successfully with a test client for Java to Java (created Java
custom serializer/deserializer and used typemapping to override default
serializers).
However, On the .Net side...
After I add the Web Reference(auto-generates the invoke functions based on
the service WSDL), I get a ClassCastException when returning a single
complex Object(I can atleast parse through the System.Xml.XmlNode[]).
And, I get the following Exception when trying to return an array of Complex
Objects (Class Object with string members):
THE FUNCTION:
public Data[] getDataObjects() {
object[] results = this.Invoke("getDataObjects", new object[0]);
return ((Data[])(results[0]));
}
THE EXCEPTION:
Exception : System.InvalidOperationException: There is an error in XML
document (5, 5). ---> System.InvalidOperationException: Namespace prefix
'null' is not defined.
at
System.Xml.Serialization.XmlSerializationReader.ToXmlQualifiedName(String
value)
at System.Xml.Serialization.XmlSerializationReader.ReadArray()
at
System.Xml.Serialization.XmlSerializationReader.ReadReferencingElement(Strin
g name, String ns, Boolean elementCanBeType, String& fixupReference)
at
System.Xml.Serialization.XmlSerializationReader.ReadReferencingElement(Strin
g name, String ns, String& fixupReference)
at
System.Xml.Serialization.XmlSerializationReader.ReadReferencingElement(Strin
g& fixupReference)
at
Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReader1.Read4_
getDataObjectsResponse()
--- End of inner exception stack trace ---
at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader
xmlReader)
at
System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClient
Message message, WebResponse response, Stream responseStream)
at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String
methodName, Object[] parameters)
at
WindowsApplication1.WebReference1.ElementServiceService.getDataObjects() in
c:\documents and settings\desktop\tia\c#tdoserdeser\windowsapplication1\web
references\webreference1\reference.cs:line 40
Message : There is an error in XML document (5, 5).
StackTrace : at
System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader)
at
System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClient
Message message, WebResponse response, Stream responseStream)
at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String
methodName, Object[] parameters)