When you look over the implementation, a number of things stand out. We use a common design pattern named service interface to separate the aspects of the Web service from the rest of the application s functionality. We introduced a stub class to separate the logical functionality from the database and the Web service. This stub allows us to work on the logical functionality without having to worry about the complications that the database and the Web service add to the problem.
For interoperability purposes, we developed a DTO, defined in XML Schema, to ensure the maximum amount of interoperability for the return type of the Web service.
We have written a set of both integration and isolation unit tests. Having built a substantial portion of our application infrastructure, we started to recognize the emerging application architecture. Seeing the coupling between the classes and test code made it easier to recognize the packaging boundaries. We have refactored our application structure to reflect the emerging architecture.