473,832 Members | 2,138 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Serialization of inherted base classes

I am trying to return from a WebMethod a class
called "TreeRespon se" which is inherited from the base
class "Response". It appears the properties in the base
class "Response" are not being serialized into the WSDL
but the properties from the inherited class "TreeRespon se"
are being serialized.

I have tried the following with no success:
1. Adding [Serializable] attribute to both classes
2. Adding [XmlInclude(type of(Response))] on TreeResponse
3. Adding [XmlElement] attributes on all properties

Anybody got any ideas - it would be a damn shame if you
cant use inheritance for web services!


Nov 15 '05 #1
0 1086

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

Similar topics

by: Ben | last post by:
Hi, there. Recently I was working on a problem where we want to save generic closures in a data structure (a vector). The closure should work for any data type and any method with pre-defined signature. When developing this lib, I figured that the pointer-to-member-function, although seemingly an attractive solution, does not work well for us.
by: ron | last post by:
Hi, I have class object that i serialize using the System.Xml.Serialization class. Intermittently the object is not getting serialized correctly, using System.Xml.Serialization classes. Therefore the application errors out when deserializing the xml data. It places the some part of the child element
by: Hasani | last post by:
If I have a base class that is derived from many classes, and I want to make all the classes serializable. Is there a way I can do this from the base class or must I add to every class, even if it's parent class has the attribute. I'm thinking no from what I've seen on google so far.
by: Mark Sizer | last post by:
Hi people, I'm having trouble trying to achieve something in C# and win forms, and am looking for a little advice if anyone has a moment. I've got two classes: 1) a base class 2) a derived class that inherits from it
by: Tamir Khason | last post by:
I have a base class MyBaseFoo with some properties, methods etc. I have some derived classes, implements small part of MyBaseFoo and a lot of their own. In order to ensure proper deserialization on versioning MyBaseFoo implements ISerializable and override constructor So following public void GetObjectData(SerializationInfo info, StreamingContext context) {
by: Glenn Wilson | last post by:
In the current project that I am planning i am thinking of serializing the objects to save as binary files. The question I have is with inheriting classes. If I have 1 base class and 2 classes that inherit from it. How would I configure them for serialization. Do I just put the Serialized setting on the 2 classes or do I also have to put it on the base class. ie.
by: SStory | last post by:
My app is near completed for the basic feature of version 1.0. I have an extensive object model and I now want to persist my objects using serialization. I have chosen binaryformatter to serialize, and custom serialization, which I understand will allow me the flexibility of not breaking old things when I add members to classes in the future and send to existing customers. 1.) is there anything else to consider with the custom...
by: John Glover | last post by:
I'm having a very strange problem with XML serialization. I'm writing web services which pass instances of various classes back and forth as parameters and return values of web methods. The problem is that in my derived classes, the XML that is automatically generated is lacking the properties of the base class. For example: public class MyBaseClass { public MyBaseClass ( ) { } private string myVariable;
by: MindWrapper | last post by:
boost serialization of polymorph classes from DLLs Folks, Let's consider following code -------------------------------- // base.h // abstract base class class IBase {
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...
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,...
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
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...
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
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.