datacontractserializer Questions
4
Short Version
I have an application which utilizes a plug-in infrastructure. The plug-ins have configurable properties that help them know how to do their job. The plug-ins are grouped into profil...
Interject asked 27/12, 2011 at 6:26
1
We were given external SOAP services that we have to consume in our project. All of these provide WSDL data, but a lot of them are not .NET services (most of them were written in Java). We have gen...
Pillion asked 23/11, 2011 at 17:40
1
Solved
I want to use a custom aplified type (think Nullable) in a DataContract class.
I tried to write a IDataContractSurrogate but it fails at deserialization.
My amplified type looks like this:
public...
Plume asked 9/11, 2011 at 21:58
1
Solved
We have an application with objects that we'd like to keep serialized in the database.
Currently we're using NetDataContractSerializer, but recently found out that due to the .Net types information...
Interspace asked 25/10, 2011 at 14:16
3
Solved
How would I tell the WCF service what KnownTypes to use when passing data back to the client?
I know I can use the [ServiceKnownType] attribute, which makes the service call run fine from a WCF Te...
Bridgetbridgetown asked 1/10, 2010 at 15:6
5
Solved
I am a bit new to WCF and will try to clearly describe what I am trying to do.
I have a WCF webservice that uses JSON requests. I am doing fine sending/receiving JSON for the most part. For exampl...
Pointing asked 19/2, 2010 at 16:32
3
Solved
I'm trying to consume a RESTful web service using WCF. I have no control over the format of the web service, so I have to make a few workarounds here and there. One major problem I cannot seem to g...
Reduplicate asked 22/1, 2010 at 22:29
1
I'm having a hard time trying to figure out a generic extension method that would serialize a given object as SOAP formatted. The actual implementation looks somewhat like this:
Foobar.cs
[Serial...
Gatling asked 19/6, 2011 at 7:0
1
Solved
I am using the DataContractSerializer to serialize EF4 objects to xml if there are exceptions.
In my debug log i can see want was the data-content when something went wrong.
I have two versions o...
Mantling asked 7/5, 2011 at 8:4
2
Solved
Are there any ways to tell WCF to serialize the whole class when it returns? Do I literally have to add DataMember to every property?
Analemma asked 15/4, 2011 at 20:10
1
Solved
I'm having a strange problem with my WCF service that returns data in JSON format.
I want to return information about a "Customer" based on the request sent by client.
Client can request what fie...
Viradis asked 16/4, 2011 at 7:5
1
I have some code something like this:
[DataContract]
class Foo {
[OnSerializing]
private void BeforeSerialize(StreamingContext ctx)
{
((MtType)ctx.Context).DoStuff()
}
...
}
var reader = n...
Totem asked 26/3, 2009 at 18:51
1
Solved
I was going through articles to understand more about the datacontractserializer and binaryformatter serializers. Based on the reading done so far I was under the impression that binaryformatter sh...
Adversative asked 20/1, 2011 at 0:36
2
Solved
I have a common library with some objects in it. Then I have a service project that references the common library and creates some derived types from objects in the common library.
I want my servi...
Residentiary asked 10/11, 2010 at 3:16
2
Solved
Having read Data Contract Versioning we concluded that it's not really the whole story. For example, what happens if you used to have ValueA, and in the new version it's now called ValueB and is of...
Gantlet asked 3/10, 2009 at 12:12
2
Solved
I just realized that DataContractSerializer expects nodes in the alphabetical order or the specified order. Is there any way i could make it NOT do it?
TIA
Ordovician asked 25/8, 2010 at 22:29
1
Solved
Is it possible that DataContractSerializer wrongly deserializes an object if the fields are not in the "correct" (whatever that means) order?
The classes that I try to serialize/deserialize do no...
Florida asked 19/7, 2010 at 16:34
1
Solved
I'm trying to use the geocoding code from here in my ASP.NET MVC 2 site. Unfortunately, some of that code, specifically the DataContractJsonSerializer usage, is only possible through .NET 4.0. As m...
Connell asked 5/7, 2010 at 9:0
2
Solved
How can I set a default value to a DataMember
for example for the one shown below:
I want to set ScanDevice="XeroxScan" by default
[DataMember]
public string ScanDevice { get; set; }
Deepseated asked 1/7, 2010 at 17:16
1
I'm currently using wrapper classes for my DataSets ,in order to implement custom serialization. I would like to use DataContractSerializer (more like have to use it) but still support the custom s...
Parlor asked 1/7, 2010 at 8:58
3
Solved
How to support both DataContractSerializer and XMLSerializer for the same contract on the same host?
In our production environment, our WCF services are serialized with the XMLSerializer. To do so our service interfaces have the [XMLSerializerFormat] attribute. Now, we need to change to DataContra...
Shing asked 11/6, 2010 at 19:50
2
Solved
If I am serializing and later deserializing a class using DataContractSerializer how can I control the initial values of properties that were not serialized?
Consider the Person class below. Its d...
Mullinax asked 28/4, 2010 at 0:1
2
Solved
I understand how XMLSerializer could work by using reflection to figure out what public read/write fields or properties it should be using to serialize or de-serialize XML. Yet XMLSerializer requir...
Cydnus asked 3/4, 2010 at 20:6
2
My SomeClass
[Serializable]
[DataContract(Namespace = "")]
public class SomeClass
{
[DataMember]
public string FirstName
{
get; set;
}
[DataMember]
public string LastName
{
get; set;
...
Isotron asked 30/10, 2009 at 16:47
1
Solved
I have the following code:
[DataContract(Namespace = "")]
public class User
{
[DataMember]
public string UserName { get; set; }
[DataMember]
public string FullName { get; set; }
}
//Deserial...
Sifuentes asked 12/2, 2010 at 6:45
© 2022 - 2024 — McMap. All rights reserved.