xmlweb-servicesxsdwsdlschema-design

Is renaming a XSD/WSDL type backward compatible in WS?


I posted another question about same thing with different approach: extending type.

My problem is basically that I made stupid choice with type naming in XSD and question is what happens if I change a type name in schema? The XML my new client would send to old customer created Web Service would be identical, but can it still cause problems?


Solution

  • Yes, renaming an XSD type is backward compatible1. All of the same XML documents that were valid before the renaming will be valid after the renaming. In fact, it's better than backward compatible because exactly the same set of XML documents that were valid before the change will be valid after the change.

    1Assuming that clients have no direct dependencies against the type names themselves such as via JAXB bindings or xsi:type use in XML doc instances. [Thanks to Petru Gardea.]