Sign in
Nicholas Allen's Indigo Blog
Windows Communication Foundation From the Inside
Translate This Page
Translate this page
Powered by
Microsoft® Translator
Tags
Answers
Bindings
Channel Extensibility
Channels
Conferences
Contracts
Debugging
Encoders
Faults
Hosting
HTTP
Indigo
Learning
Message Security
Messages
Net4
Networking
Orcas
Pages
Performance
Proxies
Queues
Releases
Reliable Messaging
Security
Security Algorithms
Serialization
Service Architecture
Service Model
Silverlight
Standards
Stream Upgrades
TCP/IP
Transport Security
Transports
Browse by Tags
MSDN Blogs
>
Nicholas Allen's Indigo Blog
>
All Tags
>
contracts
Tagged Content List
Blog Post:
Optional Xml Fields
Nicholas Allen
When using DataContractSerializer with a data member that has IsRequired set to false, the generated schema has minOccurs of 0. However, when using XmlSerializer with an XML element that has IsNullable set to true, the schema has minOccurs of 1. Instead, the schema has nillable set to true. How do I...
on
26 Apr 2010
Blog Post:
Fix for Generating Metadata Behind a Router
Nicholas Allen
When generating metadata to describe a service, an address is published for the location at which the service can be reached. This is the address to which a client of the service should address a message. Ordinarily, the metadata address is obtained by looking at the address at which the service is...
on
23 Apr 2010
Blog Post:
Referring to Generic Interfaces in Contracts
Nicholas Allen
How do I write a contract type that has a generic parameter in a service configuration file? A contract reference is part of the template for defining a service endpoint through configuration: < endpoint address =”...” binding =”...” contract =”...” /> Now, you need to fill in...
on
5 Apr 2010
Blog Post:
Fix to Generate Contract Code for Dates
Nicholas Allen
Here's a bonus entry left from last week. Last week I ran a series covering fixes for WCF that may be hard to find and explaining the details behind each problem. Contract code generation takes a system-independent description of the types used for a messaging operation and generates source code...
on
11 Feb 2010
Blog Post:
Untyped Asynchronous Calls
Nicholas Allen
How do I asynchronously call a service operation without having a typed service contract on the client? An untyped contract is one where there is a single input or output parameter of type Message. Using the Message class rather than strong types allows you to reuse the same contract for any arbitrary...
on
6 Jan 2010
Blog Post:
Customizing Parameter Names
Nicholas Allen
Why does changing the name of a parameter in a service contract break compatibility with existing clients? Each named part of the message that appears in metadata or as part of the wire protocol needs to come up with a name from somewhere. We don't have any better default name for parameters...
on
7 Dec 2009
Blog Post:
Contract First Development through Schema
Nicholas Allen
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 also look at tooling for working with schemas including...
on
2 Oct 2009
Blog Post:
Data Deserialization Order
Nicholas Allen
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 having to accept data in any order tends to...
on
25 Aug 2009
Blog Post:
Overriding Namespaces from Serialization
Nicholas Allen
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 transformation of breaking apart the authority...
on
21 Aug 2009
Blog Post:
Contract First Development Tool
Nicholas Allen
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, the WCF version is called WSCF Blue while the ASMX...
on
8 Jul 2009
Blog Post:
Environment Independent Versions
Nicholas Allen
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 service? I generally don’t recommend including...
on
6 Jul 2009
Blog Post:
Collection Name Generation
Nicholas Allen
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? The generation of default names is based on...
on
15 Jun 2009
Blog Post:
Naming Collection Items
Nicholas Allen
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 > < string > Adelost </ string...
on
11 Jun 2009
Blog Post:
Putting Data in Order
Nicholas Allen
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 data member's order and try to define what...
on
1 Apr 2009
Blog Post:
Distinguishing Messages
Nicholas Allen
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 be associated with. It would be of no benefit...
on
24 Mar 2009
Blog Post:
Callback Behaviors
Nicholas Allen
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 description. On the IContractBehavior you'd implement...
on
12 Mar 2009
Blog Post:
Using Faults with Untyped Messages
Nicholas Allen
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 as the message. This allows the transformation...
on
15 Aug 2008
Blog Post:
Getting Rid of Namespaces
Nicholas Allen
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] [WebInvoke(BodyStyle = WebMessageBodyStyle...
on
11 Aug 2008
Blog Post:
System Types in Metadata
Nicholas Allen
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 implementation used by that type, which effectively...
on
5 Aug 2008
Blog Post:
Avoiding Address Filters
Nicholas Allen
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 to all of the logical operations that live inside...
on
30 Jul 2008
Blog Post:
Naming Contracts for Versioning
Nicholas Allen
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 member names tends to leak across the service...
on
11 Jul 2008
Blog Post:
Pointing to External Metadata
Nicholas Allen
I've previously talked about using WSDL extensions to provide custom modifications to the WSDL import and export process. Making modifications to an existing WSDL document or to the existing WSDL processing is a great way to make small changes when the default behavior almost gets you to where you want...
on
19 May 2008
Blog Post:
Setting the Configuration Name
Nicholas Allen
What's the difference between the Name and ConfigurationName on service contracts and behaviors? The Name property sets the name of the service in metadata while the ConfigurationName property sets the name of the service in configuration. Metadata is the part of the service description that is...
on
9 May 2008
Blog Post:
Private Data Members
Nicholas Allen
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 why the information isn't preserved by the representation...
on
5 May 2008
Blog Post:
Configuring Protection Level
Nicholas Allen
Is it possible to configure the protection level for message parts at runtime? Only certain configurations make doing this particularly easy. When using transport security with Windows credentials, the WindowsStreamSecurityBindingElement allows you to directly set the protection level (changing...
on
10 Mar 2008
Page 1 of 2 (48 items)
1
2