The Substitution Principle in an Object-Oriented Framework for Web Services: From Failure to Success
Résumé
Nowadays, services are more and more implemented by using object-oriented frameworks. In this context, two properties could be particularly required in the specification of these frameworks: (i) a loose coupling between the service layer and the object layer, allowing evolution of the service layer with a minimal impact on the object layer, (ii) an interoperability induced by the substitution principle associated to subtyping in the object layer, allowing to freely convert a value of a subtype into a supertype. However, experimenting with the popular CXF framework, we observed some undesirable coupling and interoperability issues, due to the failure of the substitution principle. Therefore we propose a new specification of the data binding used to translate data between the object and service layers. We show that if the CXF framework followed the specification, then the substitution principle would be recovered, with all its advantages.