Interface Contracts for WCF Services with Code ContractsApril 30th, 2012
FiledApril 30th, 2012Abstract—Windows Communication Foundation (WCF) is a widely used technology for the creation and deployment of distributed services such as Web services. Code contracts are another .NET technology allowing the specification of pre- conditions, postconditions and invariants for .NET interfaces and classes. The embedded constraints are exploited for static analysis, runtime checking, and documentation generation. Basically, WCF services can be equipped with code contracts. However, it turns out that the WSDL interfaces generated for deployed WCF services do not include expressions for code contracts. Hence, the constraints imposed on WCF services are not visible for a service consumer. Though a proper integration of both technologies would bring additional expressive power to WCF and Web services, there does not exist a solution yet. In this paper, we present a novel approach that brings code contracts to WCF. Our solution comprises the integration of code contracts expressions at WSDL l