Click to See Complete Forum and Search --> : Returning an ArrayList of string[] in a WebMethod


scorpicorn
September 1st, 2004, 09:01 PM
Working on a web service in VS.net. When trying to return an ArrayList containing objects of type string[], the client call to the webmethod always fail with the following error:

System.InvalidOperationException: There was an error generating the XML document. ---> System.InvalidOperationException: The type System.String[] may not be used in this context.

Does anyone has any idea why is this happening?

Thanks in advance.

MRutledge
September 2nd, 2004, 12:45 AM
take a look at this link
http://www.dotnet247.com/247reference/msgs/36/184691.aspx

scorpicorn
September 9th, 2004, 05:55 AM
Found that adding XmlInclude attribute will resolve the problem.

Thanks