I have an object data class that Inherits from a java class and implements
System.Runtime.Serialization.ISerializable as I only need to transfer across
three properties, string, array of objects and another class OID, which
returns an integer.
I'm passing over the object data class to the web server, step through to
the client side proxy and get the following error, which I assume is a
problem before it even hits the web service directly.
There was an error generating the XML document."
"The type System.Object[] may not be used in this context."
StackTrace " at
System.Xml.Serialization.XmlSerializationWriter.WriteTypedPrimitive(String
name, String ns, Object o, Boolean xsiType)
at
Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationWriter1.Write3_Object(String n, String ns, Object o, Boolean isNullable, Boolean needType)
at
Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationWriter1.Write1_netObjectData(String
n, String ns, netObjectData o, Boolean isNullable, Boolean needType)
at
Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationWriter1.Write39_makePersistent(Object[] p)" String
It looks as though it's an issue with trying ot send over an array of
system.object.
Does anyone have any idea of what I can do to get this working
(binary/memory stream serialization seems an option).
Thanks
Keenan Newton - 25 Feb 2005 21:26 GMT
Check out this MSDN URL on the valid types that may be passed via a web
service.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cp
conaspnetimplementationofwebservices.asp
The "object" type is not allowed, however arrays are allowed.
RichardG - 01 Mar 2005 10:23 GMT
Many thanks. Missed that. I've changed over to use bytes for the more complex
objects.