2007-03-09

Schema management in Web Services

A Web Service is specified by a WSDL contract that defines types using XML Schema.

For basic services - like Hello World, Calculators, etc - it is sufficient to have a single, embedded schema in your contract.
However, for useful, real-world, services you need to take schema management into consideration, otherwise you end up with lots of replicated data structures. You should have, at least, the following indirection levels:

WSDL operations
depends on
XSD operations input and output
depends on
XSD domain entities

The domain entities should be shared in meta-data repository, to avoid uncontrolled replication.
For controlled replication, you can use data catalogs, that work as a schema cache, not as a schema copy.

No comments: