XML Standards for Service Modeling

When designing web services, it becomes apparent that it is necessary to lock in standards for designing the service contracts as well as the service models. In an effort to standup the initial phase of the SOA Enterprise, many services begin to expose themselves on the ESB that either are driven by a legacy system (such as a mainframe generated service) or by developer building the models in isolation. Since the goal is to drive towards a common Canonical Model, it is important to define a set of standards around how Schemas are designed and rules that need to be followed when creating them.

If we do a little googling, you might land on the Oasis XML Coverpages website, which is a great resource for XML based standards groups. The XML Coverpages site has a landing page for Naming and Design Rules. One of the resources made available in the table listing of this page is the “UN/CEFACT XML Naming and Design Rules”, which has two great resources.

UN/CEFACT 8 XML Naming and Design Rules Technical Specification 9 Version 3.0
UN/CEFACT/UBL XML Naming and Design Rules Analysis

The “UN/CEFACT/UBL XML Naming and Design Rules Analysis” is a spreadsheet that can be downloaded in DOC format. It refers to another document called Universal Business Language (UBL)
Naming and Design Rules
. These documents provide some very detailed discussions around the standard uses of XML Schemas and the implementation of the XML Schema to create Models. This might be as detailed as to the types of names of elements, what attributes are expected, and whether or not features in the XML Schema Specification can be used at all (like xs:all).

Another one of the interesting examples is the Department of the Navy
XML Naming and Design Rules
because of the great detail an explanation of all the different types of rules and usage standards.

In reading these documents, it becomes quite apparent how difficult it can be to produce the ideal environment for Service Modeling, let alone the complexities/capabilities in utilizing the XML Schema Specification. These concepts are very important in a SOA that pushes a Contract-First methodology, where the WSDLs and Schemas will be designed and developed first. One of the books for Java web service development talks about a bridged approach between the Contract-First and Code-First called Code-First/Contract-Aware.

Here is the book

This is really about taking advantage of the great annotation support in JAX-WS and JAXB to replicate the standards for Service Modeling within the annotations themselves. While you have more power in developing the XML Schemas directly, the simplicity that is provided through the JAXB annotations cannot be understated. Even with the power of JAXB annotations, standards will be necessary for the names/features that are used with the framework, along with defining how to implement complex JAXB representations such as Maps/Enums/Collections.

For some businesses, these documents and their detail maybe overkill, but there is probably some value at least in having some generalized rules for XML naming and design (such as not having verbs in the Schema names except for the introduction of operations within the WSDL, or the names of elements and what detail they are, etc). Having a set of some core rules and definitions will ease the integration of development teams into the enterprise SOA.

Share and Enjoy