Tuesday, November 01, 2005

WS Extension

There are two ways in which a service can be extended in a backward compatible manner:

  • Adding new operations
  • Updating existing operations: Changing service input or Changing service output

If adding new operations is obviously a backward compatible extension, updating existing operations is more challenging.

For extensibility purpose, Web Service parts should be defined as XML complex type elements. This pattern of document/literal is named document/literal wrapped. When using document/literal a WS can be extended as follow:

Extending Input
The XML complex type that defines the Web Service input can be updated by creating a new data type that is a subset of a base data type by either:

  1. Adding new optional elements
  2. Increasing the range of value of some base type elements
  3. Redefining base type elements to have more occurrences

Those rules do not rely on specific schema design patterns. Note that document/literal wrapped style must be used.

Extending Output
To insure backward compatibility, extension made to a Web Service output XML complex type must be done as follow:

  • Add new elements to extend complex data types. This requires the base complex type to contain the extension element “”.

  • Create a new data type that is a subset of a base data type by either:
  1. Redefining base type elements to have a restricted range of value
  2. Removing optional base type elements
  3. Redefining base type elements to have more restricted number of occurrences

0 Comments:

Post a Comment

<< Home