[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
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
?
455 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

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

Here I am going to explain creating proxies at runtime for WCF Service. So basically we use to generate proxies using Add Service Reference and then giving the Url of the WCF service then generate proxy files at client side. Ok, what if something ge…
Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…

656 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