473,657 Members | 2,604 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

WebService and error (SoapInclude / XmlInclude) ?

I get this error when i test my webservice;

System.InvalidO perationExcepti on: There was an error generating the XML
document. ---> System.InvalidO perationExcepti on: The type RMAWS.Symptom was
not expected. Use the XmlInclude or SoapInclude attribute to specify types
that are not known statically.
at
System.Xml.Seri alization.XmlSe rializationWrit er.WriteTypedPr imitive(String
name, String ns, Object o, Boolean xsiType)
at
Microsoft.Xml.S erialization.Ge neratedAssembly .XmlSerializati onWriter1.Write 1
_Object(String n, String ns, Object o, Boolean isNullable, Boolean needType)
at
Microsoft.Xml.S erialization.Ge neratedAssembly .XmlSerializati onWriter1.Write 6
_ArrayOfAnyType (Object o)
--- End of inner exception stack trace ---
at System.Xml.Seri alization.XmlSe rializer.Serial ize(XmlWriter xmlWriter,
Object o, XmlSerializerNa mespaces namespaces, String encodingStyle)
at System.Xml.Seri alization.XmlSe rializer.Serial ize(TextWriter
textWriter, Object o)
at System.Web.Serv ices.Protocols. XmlReturnWriter .Write(HttpResp onse
response, Stream outputStream, Object returnValue)
at System.Web.Serv ices.Protocols. HttpServerProto col.WriteReturn s(Object[]
returnValues, Stream outputStream)
at System.Web.Serv ices.Protocols. WebServiceHandl er.WriteReturns (Object[]
returnValues)
at System.Web.Serv ices.Protocols. WebServiceHandl er.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
Nov 15 '05 #1
0 3231

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
2065
by: Benne Smith | last post by:
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
1
24758
by: Bob Rock | last post by:
Hello, I have a web method that serializes a class that includes among its public fields a System.Object field to which, at runtime, I assign instances of various different classes. When XmlSerializer tries serializing this public field's real content I get a "The type namespace.classname was not expected. Use the XmlInclude or SoapInclude attribute to specify types that are not known statically.". I suppose this is due to the fact that...
12
4119
by: Jose Fernandez | last post by:
Hello. I'm building a web service and I get this error. NEWS.News.CoverNews(string)': not all code paths return a value This is the WebMethod public SqlDataReader CoverNews(string Sport) {
4
1470
by: Nick Gilbert | last post by:
Hi, I'm developing a webservice that will accept an Order and forward it to a backend system, but I'm having a problem with transferring my "Order" class over a webservice. When I try and call the webservice and pass it an Order, I get the following error message: The type Wright.BusinessLogicLayer.OrderLine was not expected. Use the
0
1644
by: Alex | last post by:
Hi! I have previously designed class that would read encrypted connection from registry, create a connection object (sql, oracle, oledb...) and return it to the calling class. I had to change this class to a webservice, but I keep running into various problems. The latest one has to do with the fact that it requires me to use XMLInclude or SoapInclude. I'm fairly new to webservices so what I need is a small, clear sample how to create a...
0
2085
by: Alex | last post by:
Hi! I have previously designed class that would read encrypted connection from registry, create a connection object (sql, oracle, oledb...) and return it to the calling class. I had to change this class to a webservice, but I keep running into various problems. The latest one has to do with the fact that it requires me to use XMLInclude or SoapInclude. I'm fairly new to webservices so what I need is a small, clear sample how to create a...
0
891
by: CraigMuckleston | last post by:
I am building a generic web service to convert a .NET Crystal Report into a PDF document. I am trying to pass the Crystal Report through to the web service, but get the following error from the web service: System.InvalidOperationException: The type xxx was not expected. Use the XmlInclude or SoapInclude attribute to specify types that are not known statically. I am using the following to in my web service code behind file: ...
3
1422
by: Rotsey | last post by:
Hi, I am trying to send a object to a webservice and I get an serialisation error on the object saying "object not expected" add "XmlInclude or SoapInclude attribute" I have done this but still get the error. Below is the class. The problem is with "data" object.
0
8385
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8303
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8821
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8723
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8502
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
4150
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2726
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1941
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1601
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.