Web Services API Versioning

前端 未结 5 1128
长情又很酷
长情又很酷 2020-12-31 01:34

I offer a small Web Services API to my clients which I plan to evolve over time. So I need some sort of versioning, but I can\'t find any information about how you do someth

5条回答
  •  时光说笑
    2020-12-31 02:22

    The most common strategy that I've seen is to version the WSDL by adding versioning identification (typically yyyy/MM[/dd]) to the namespace of objects in the wsdl, viz:

    targetNamespace="http://schemas.mycompany.com/2010/01/widgets"
    

    This can be done either at a per-type (types/schema) level or at the whole WSDL level - in 1.1 or in 2.0.

    Somewhat dated, but this link from IBM Developer Works provides the rationale for this approach, and specifically when versions need to be incremented:

    Backwards version compatable / non-breaking changes:

    • Adding new operations
    • Adding new types

    Breaking changes:

    • Removing or renaming operations
    • Changing parameters to a method
    • Changing a complex type

提交回复
热议问题