I am setting up a web services project. One questions which I have to take decision on is "should I maintain 1 schema file or multiple schema file"
Advantages of 1 schema file:
1. Easier to control: Schema definitions should be managed in a controlled manner as a small change can impact multiple services. Having 1 schema file helps manage schema file easily
2. Promotes reuse
Advantages of multiple schema file:
1. Can componentize schemas based on functional components. Thus easier to present smaller schema to client apps based on services they use.
2. Can present specific schema to the customers
3. Promotes reuse
I am tending towards below:
Start with a small number of schema (say a commonschema.xsd and applicationschema.xsd) and then divide applicationschema.xsd into multiple based on if there are clients which uses partial functionality.
I am looking at suggestions/opinions regarding this approach. Also if there are any other advantages each of approach(1 schema vs multiple schema) have
I suspect there is not much to add - you have a good grasp of the problem and have proposed a very reasonable strategy!
Remember that not only XML schemas, but also WSDL files can be split into multiple files. For instance, one WSDL file may specify the abstract interface of the web service while another specifies the more concrete aspects, such as the endpoint address etc.