473,385 Members | 1,606 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Serialization, Reflection and Inheritance question

Hi All,

Im developing a web service in C# that Im running into a few problems
with. Essentially I am trying to move a custom class (which contains an
array of objects) over the WS to the client. This works fine if the
objects in question have no parent (ie they do not directly inherit
from my classes), however the moment I create a say "BaseObject" to
inherit them from, I get Reflection errors such as;

An unhandled exception of type 'System.InvalidOperationException'
occurred in system.web.services.dll

Additional information: Method Commission.GetEmployees can not be
reflected.

What I have as an example is an Employee Class that has a parent,
EmployeeSuper. Both are marked as Serializable, and appear correctly (I
believe) in the proxy generated in VS.net.

So to my question, does C# allow reflection on derived classes? And has
anyone ever built WS passing custom collections of inherited classes
(and can they give me any hints as to what Im doing wrong??).

Regards,
Rob

Nov 17 '05 #1
0 1268

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

Similar topics

0
by: HakonB | last post by:
Hi all I get an exception when trying to deserialize a simple configuration file using XML Serialization. The very long stacktrace can be seen at the bottom of this message. I've see other...
4
by: Jeff T. | last post by:
Hello, I have an existing set of C# classes that encapsulate our application data. They are in a heirachy with each subclass defining more specific types of data. I would like to serialize these...
3
by: Aaron Clamage | last post by:
Hi, I'm not sure that if this is the right forum, but any help would be greatly appreciated. I am porting some java serialization code to c# and I can't figure out the correct way to do it. ...
3
by: Noël Danjou | last post by:
VS.NET 2003, C# and .NET Framework 1.1. Hello, I am trying to serialize a small sample class using the XmlSerializer class. ** Here is the code: DerivedClass myClass = new DerivedClass(5,...
2
by: Robert Magnusson | last post by:
Hi all, I have a healthy class defined that happily serializes and deserializes from the underlying XML file. The problem I hit is that, as soon as I add an implicit conversion in any of the...
0
by: aegis | last post by:
Hi All, Im developing a web service in C# that Im running into a few problems with. Essentially I am trying to move a custom class (which contains an array of objects) over the WS to the client....
27
by: Codemonkey | last post by:
Heya All, Sorry, but I think it's about time for a monkey-ramble. I've just had enough of trying to serialize even simple objects with VB. A simple task you may think - stick the...
3
by: _DD | last post by:
I had one experimented with binary serialization of an ArrayList of structs (each struct mostly contains strings). Strangely enough, it did not run as fast as custom XML storage (latter was...
0
by: nobin01 | last post by:
Dear sir; I want ur Help in serialization.I know serialization.I Know binary,soap and xmlserialization also.But i want ur help in following topics.pls help me as soon as possible.I have search in...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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,...
0
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...
0
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,...
0
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...

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.