Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / Web Services / March 2005

Tip: Looking for answers? Try searching our database.

Error generating XML document - System.Object[] may not be used

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
RichardG - 25 Feb 2005 10:01 GMT
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.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.