datacontractserializer

DataContractSerializer - Problems

Hi guys, I'm having what must be a VERY SILLY issue with the Data Contract Serializer. It refuses to work. I'm just trying to serialize an object into an XmlDocument, however I seem to be hitting a wall. Here are the datacontracts I wish to serialise: [DataContract(Namespace="urn://test", Name = "ServiceFault1")] public class ServiceF...

Service contract and variable names

Hi, I have WCF service. I have changed the name of the variable in datacontract, rebuilt service but did not rebuilt client Before, this is operation contract for client [OperationContract(Name = "SubscribeWcfProvider")] bool Subscribe(Guid subscriptionid); After, this is operation contract for service [OperationContract(Name = "S...

WCF REST: ReadAsDataContract using classes "WITHOUT" decoration attributes DataContract and DataMember

Hi there, I have just done some tests and i have manged to get ReadAsDataContract working on the Response.Content method... The thing that really is confusing is that i thought it shouldn't work yet! As my classes are NOT decorated with the DataContact or DataMember Attributes. I am confused, reading the various tutorials around the ...

DataContract serializer support for imports. Out of band mechanism?

Describing the DataContractSerializers support for import msdn has this to say: Supported. DataContractSerializer supports xs:include and xs:import. However, Svcutil.exe restricts following xs:include/@schemaLocation and xs:import/@location references when metadata is loaded from a local file. The list of schema files must be passed th...

Serializing to XML via DataContract: custom output?

I have a custom Fraction class, which I'm using throughout my whole project. It's simple, it consists of a single constructor, accepts two ints and stores them. I'd like to use the DataContractSerializer to serialize my objects used in my project, some of which include Fractions as fields. Ideally, I'd like to be able to serialize such o...

why DataContractSerializer is faster that xmlSerializer ?

Performance wise, why and how Datacontract serializer is better than xmlserializer ? ...

DataContract XSD issue

I am wanting to validate a DataContract (long story short) Here is my DataContract: [DataContract(Name = User.Root, Namespace = "http://mysoft.com/schemas/registeruser.xsd")] public class RegisterUser { [DataMember(Name = User.EmailAddress)] public string EmailAddress { get; set; } [DataMember(Name = User.UserName)]...

Serialize Partial DataContract

I have a DataContract that looks like: [DataContract(Name = User.Root, Namespace = "")] public class RegisterUser { [DataMember(Name = User.EmailAddress)] public string EmailAddress { get; set; } [DataMember(Name = User.UserName)] public string UserName { get; set; } [DataMember(Name = User.Password)] pub...