WCF contract changes that affect clients

前端 未结 5 1405
南笙
南笙 2021-02-01 10:31

I was curious if someone could outline which types of WCF contract (interface) changes on the server side would break a client trying to send in a message, and why. I believe W

5条回答
  •  有刺的猬
    2021-02-01 10:46

    Check out this article on dasBlonde: Versioning WCF Service Contracts

    It lists what changes will break existing clients:

    1. Remove operations
    2. Change operation name
    3. Remove operation parameters
    4. Add operation parameters
    5. Change an operation parameter name or data type
    6. Change an operation's return value type
    7. Change the serialized XML format for a parameter type (data contract) or operation (message contract) by explicitly using .NET attributes or custom serialization code
    8. Modify service operation encoding formats (RPC Encoding vs. Document Literal)

    This article by Michele explains in more detail how you can design contracts to be more flexible.

提交回复
热议问题