Welcome to MSDN Blogs Sign in | Join | Help

Browse by Tags

All Tags » Serialization   (RSS)

Generating Types with Lists

I have a data contract that contains a collection type but the generated proxy appears as an array. How can I make the proxy use a collection type as well? I've talked in the past about how the representation of a type in metadata is decoupled from the

Private Data Members

Why does a data contract with private or internal members generate a proxy with public fields? The obvious answer is that the representation for data contracts doesn't contain information about member visibility but that just leads to the question of

One Shot Serialization

Why do some serialization errors when sending a response not result in a fault being returned to the client? In the typical service operation, sending a response is comprised of returning the appropriate information from the service method to construct

Differences in Enum Serialization

Why does adding an enum parameter to an operation cause the proxy to explode into message contracts? This was a question asking why the following perfectly ordinary operation contract caused svcutil.exe to spit out some really ugly code. [OperationContract]

Producing Typed Messages

How do typed messages get created from an object that has a message contract? There seem to be a lot of examples that talk about how messages get produced when they're described by data contracts but relatively few descriptions of the equivalent process

Differences in Guid Serialization

Why do the guids in my contract turn into strings when generating a client? You're probably mixing different types of serializers between the client and service. There's nothing wrong with this and the generated client will work correctly but you don't

Collections without CollectionDataContract

In the article about serialization conflicts , one of the points mentioned was that CollectionDataContract doesn't let you add non-default data members. How do I format a collection that contains data members? CollectionDataContract is automatically being

Resolving Conflicts in Serialization

DataContractSerializer supports multiple serialization mechanisms. If more than one serialization mechanism is specified for the same type, which one gets used? Experimentation is the easiest way to figure out what happens. I'll look at different combinations

Serialization and Types

How does a DataContract type get initialized on the server? When I change the constructor for the type, nothing happens. Older serializers relied on calling the parameter-less constructor to initialize the type when deserializing data. Data contract types

Differences Between WSDL and XSD

Obviously WSDL and XSD are two entirely different description languages, but I was looking at the outputs of the old wsdl.exe and xsd.exe programs recently to see how they differed. They turned out to generate data type classes that were pretty much the
Posted by Nicholas Allen | 1 Comments
Filed under: ,

Two Videos on Orcas

With all the things that were happening during the summer, I evidently missed out on two Channel 9 videos that were done on the Orcas version of WCF. These cover some of the features that are new in the upcoming .Net Framework 3.5 release. In the first

ContractNamespaceAttribute

Back when I did an overview of custom namespaces , I omitted any namespace declarations that wouldn't appear in the final metadata. One of those declarations is the default namespace for data contracts. I had two example data contracts, one for faults

Serializing UniqueId

Why can't UniqueId be serialized? Data contracts only have native support for a limited set of types. If you use a type that is not in this native set, then you'll get an exception that the data contract is invalid unless you decorate the type with attributes

Custom Namespaces

If you've ever looked at a generated WSDL file, you may be wondering how all of the different parts of the service description are reassembled to form WSDL. Today's article is about the namespaces in the WSDL file. Here's an example service that provides

Data Contract and Message Contract

I have an existing web service that I need to replace with a WCF web service. How do I choose between using a data contract and a message contract? There are actually three choices to consider for describing the messages that your service uses: data contracts,
 
Page view tracker