WebService and error (SoapInclude / XmlInclude) ?

B

Benne Smith

I get this error when i test my webservice;

System.InvalidOperationException: There was an error generating the XML
document. ---> System.InvalidOperationException: The type RMAWS.Symptom was
not expected. Use the XmlInclude or SoapInclude attribute to specify types
that are not known statically.
at
System.Xml.Serialization.XmlSerializationWriter.WriteTypedPrimitive(String
name, String ns, Object o, Boolean xsiType)
at
Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationWriter1.Write1
_Object(String n, String ns, Object o, Boolean isNullable, Boolean needType)
at
Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationWriter1.Write6
_ArrayOfAnyType(Object o)
--- End of inner exception stack trace ---
at System.Xml.Serialization.XmlSerializer.Serialize(XmlWriter xmlWriter,
Object o, XmlSerializerNamespaces namespaces, String encodingStyle)
at System.Xml.Serialization.XmlSerializer.Serialize(TextWriter
textWriter, Object o)
at System.Web.Services.Protocols.XmlReturnWriter.Write(HttpResponse
response, Stream outputStream, Object returnValue)
at System.Web.Services.Protocols.HttpServerProtocol.WriteReturns(Object[]
returnValues, Stream outputStream)
at System.Web.Services.Protocols.WebServiceHandler.WriteReturns(Object[]
returnValues)
at System.Web.Services.Protocols.WebServiceHandler.Invoke()
I'm trying to return an ArrayList of RMAWS.Symptoms objects. Normally,
before the reinstall of my machine, it worked fine, and returned a object[]
which i could just enumerate and typecast to the right object. But now i get
this error ? What am i missing ?Thanks,Benne
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top