Home // International Journal On Advances in Software, volume 4, numbers 3 and 4, 2011 // View article
Interface Contracts for WCF Services with Code Contracts
Authors:
Bernhard Hollunder
Keywords: Code Contracts, Windows Communication Foundations, WCF, Web Services, WS-Policy, WSDL, Contracts Aware Proxies
Abstract:
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 preconditions, 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 level as well as the generation of contracts aware proxies. The feasibility of the approach has been demonstrated by a proof of concept implementation.
Pages: 275 to 285
Copyright: Copyright (c) to authors, 2011. Used with permission.
Publication date: April 30, 2012
Published in: journal
ISSN: 1942-2628