Customizing Parameter Names

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 than the name you give us. If you want to change that parameter name later, then it will also change the name being used to identify that part of the message.

To name the part of the message differently than the name of the parameter, you can specify a name to use instead of the default. This works through the Name field of the MessageParameter attribute that goes on the parameters in the operation contract. You can also use the same mechanism to name the return value of the operation.

[return: MessageParameter(Name = "result")]
string Hello([MessageParameter(Name = "id")]string userID, string name);