?
Solved

How do I get ASP.Net Web Service Serialization to work correctly with inherited and implented data entities in Web Services

Posted on 2009-05-12
3
Medium Priority
?
453 Views
Last Modified: 2013-11-08
Application Architecture: 3 Tiered with Data Entities

1. .svc Web Service
2. DAL
3. Web Application

  I have a web application that "calls" for data on the DAL.  The DAL queries the database and puts that data into a data entity via a custom build "data mapper."  The web application receives that data entity and processes it appropriately.  However the some of the data entity's properties are null.  Our custom data mapper, DAL and Stored procedures (oracle db) are working correctly and returning data as designed.  And the data entity is correctly designed as showed below.  The data entity inherites another class properties and implements an interface.  The data entity has no methods only data properties.  As shown below  alpha inherits childA and implements childB.  The problem is childB properties are not being set.
using System.Runtime.Serialization.
...
 
[Data Contract]
Public class alpha: childA, childB
{
...
}
 
[Data Contract]
Public class childA
{
  [Data Member]
  public string name{set;get;}
  [Data Member]
  public int age{set;get;}
}
 
 
 
[Data Contract]
public interface childB
{
  [Data Member]
  public int weight{set;get;}
  [Data Member]
  public int height{set;get;}
}

Open in new window

0
Comment
Question by:ICDB_ED
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 7

Expert Comment

by:deadlyDev
ID: 24516337
You need to apply the data member attributes to the properties in alpha, and not the interface
0
 
LVL 7

Accepted Solution

by:
deadlyDev earned 1000 total points
ID: 24525511
Did this solve your problem?
0
 

Author Closing Comment

by:ICDB_ED
ID: 31580824
Yes it did.  Sorry for the delay
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction Hi all and welcome to my first article on Experts Exchange. A while ago, someone asked me if i could do some tutorials on object oriented programming. I decided to do them on C#. Now you may ask me, why's that? Well, one of the re…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
Suggested Courses

801 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question