Welcome to MSDN Blogs Sign in | Join | Help

Browse by Tags

All Tags » Contracts   (RSS)

Contract First Development through Schema

Christian Weyer and Buddhike de Silva have an article in this month's MSDN magazine covering contract-first development with WCF . They go over modeling messages and services through schema and then applying that to build a web service with WCF. They

Data Deserialization Order

Why are the members of a data contract expected in a particular order in order to be read? The order of members is frequently used to build an expectation of what element might be appearing next. Knowing the possible order of data instead of potentially

Overriding Namespaces from Serialization

I’ve defined my own XML namespaces for the members of a data contract and now when I generate the client proxies I get some ugly CLR namespaces for the types. How do I fix this? The mapping from an XML or WSDL namespace to a CLR namespace is a mechanical

Contract First Development Tool

A beta release of the Web Services Contract First tool is available on CodePlex. This is a Visual Studio 2008 add-in targetting WCF made by the same group in the web services community that did a tool of the same name for ASMX (to tell the two apart,

Environment Independent Versions

In the recommendation for designing versionable contract names , there was no mention of the deployment environment of the service. Should this be included by, for example, having different namespaces for development and production deployments of the
Posted by Nicholas Allen | 0 Comments
Filed under: , ,

Collection Name Generation

Last time we were looking at how to replace the default names used for serializing collections , such as ArrayOfKeyValueOfstringArrayOfstringty7Ep6D1, with more intelligible names. However, where did that funny looking name come from in the first place?

Naming Collection Items

How do I replace the names of entries in a collection? By default the names inside of a collection are based on the type or role of the entry. < CheeseMap > < KeyValueOfstringCheeseListLjh4bohd > < Key > Sweden </ Key > < Value

Putting Data in Order

How do I control the order in which members of the data contract are serialized? The DataMember attribute has a property called Order that influences the order in which the different members are serialized. Let's call the value of the Order property the

Distinguishing Messages

Can I have two operations with the same name but different calling conventions use the same action? No, the point of the action property on a message is to guarantee that the message contains sufficient information to distinguish which operation it should

Callback Behaviors

How do I apply behaviors to the callback portion of a callback contract? If you were going to apply a behavior to the non-callback portion of the callback contract, you'd do so through an IContractBehavior attached to the relevant part of the service

Using Faults with Untyped Messages

When using a typed contract, incoming messages on the server are shredded on your behalf to be turned into method calls and parameters. Ordinarily, the particular method call selected for an application messages will have the same parameterized contract

Getting Rid of Namespaces

How do I write a contract for a wrapped message in the default namespace? I've written a quick sample to demonstrate what happens when you write the contract without taking any namespaces into account. [ServiceContract] public interface IService { [OperationContract]

System Types in Metadata

It's bad practice to use system types when defining an operation contract. A system type is often a complex composition of primitive types that has no direct analog in other implementations. By using a system type, you bind your service to the particular

Avoiding Address Filters

The address filter mode that we looked at last time solved the problem of funneling all of the messages with a given prefix address to our service instance. Changing the filter mode still left us with the problem of dispatching from that universal contract

Naming Contracts for Versioning

Some tips for building support for versioning into the naming of data contracts. First, the primary route for versioning should be through the namespace part of the contract rather than the member name part of the contract. Versioning the contract through
More Posts Next page »
 
Page view tracker