473,320 Members | 1,933 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,320 software developers and data experts.

WCF Defatul DataMember value problem

Hello,

I am trying to specify a logical default value for a [DataMember] in a WCF
Web Service using basicHttpBinding.

I realize that the language defaults are:

int - 0
string - null
bool - false
enum - ?

I tried using OnDeserializing and OnDeserialized events, but when the client
doesn't explicitely set the value for an int member, for instance, I keep
getting 0. For a bool memeber I get a 'false', and for an enum member it
picks some default, but I don't know how it picks it. The only default that
I can logically work with is the null for reference types, including
strings.

The XSD allows you to specify "default=" attribute for a member, but in WCF
I don't have control over wsdl/schema generation. So I thought there would
be a way to specify a logical default value for a DataMember through an
Attribute settings of some sort, but I can't find one.

Please help!!!

thanks,

Dave Raskin
Rimage Corporation
Jun 27 '08 #1
0 1256

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

Similar topics

0
by: Johann Blake | last post by:
I have a form with textboxes that are bound to a dataset. The dataset contains two tables and some of the textboxes use data from one table while other textboxes use data from the other table. I...
3
by: Alvaro E. Gonzalez V. | last post by:
Hello!!! I'm building a control that in a property assign a Dataset which they are initialized and another property Like DataMember. Similar as it happens to the DataSource property of a...
0
by: OpticTygre | last post by:
Ok, kindof new to the whole XML schema stuff, but here's what I'm trying to do. I have a form that reads an xml schema into a dataset on another form, then fills in the headers of a datagrid based...
0
by: dugu | last post by:
unable to bind to field datamember
1
Echooff3
by: Echooff3 | last post by:
I'm gonna pull my freakin hair out!!! This is the second time I had .Net lock me out of one of my forms with this error. I have a relational dataset and on a particular form there is the master...
1
by: =?Utf-8?B?cmFuZHkxMjAw?= | last post by:
In the Visual Studio 2005 designer, I have a grid, a binding source, and a data set which contains two data tables. In the Designer, I make the settings below. If I set the DataMember for the...
0
by: mzwilli | last post by:
Hi, I'm trying to create browsable DataSource and DataMember properties on a user control. The idea is to create a descendent object, place a dataset then specify the DataSource (DataSet) and...
0
by: Dave Raskin | last post by:
I am trying to specify a logical default value for a in a WCF Web Service using basicHttpBinding. I realize that the language defaults are: int - 0 string - null bool - false enum - ?
3
by: blackirish | last post by:
Hi all, I am developing a WCF application and i can send simple DataContract classes without problems. But when i try to send a class having a different type of class as a field, i get...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.