Web Service Versions

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Shaji Sethu

    #1

    Web Service Versions

    Hello All,
    I have a question that I have been grapling with for sometime. I have
    a web service that has been developed by using xsd schema and then
    generating a WSDL with the included schema. The WSDL then is converted
    to server side stub which is then implemented. Now the problem is the
    web service has been deployed and we need to change the functionality
    a bit. So it means changes to the xsd schemas. How do we change the
    web services such that we can add new functionalty without breaking
    the old clients. One way would be to version the XSD using namespace,
    if we do that will all the clients using the older web service
    continue to work. If anyone has any ideas or have solved this problem
    previously I would appreciate your help.
  • Richard Thombs

    #2
    Re: Web Service Versions

    I ended up tagging my .asmx files with a 'Vx' suffix, so I have
    TeamHavenMobile V1.asmx, TeamHavenMobile V2.asmx etc, etc.

    Each new version started off as a direct copy of the code and then code
    modified to add whatever new methods I wanted, thus ensuring that the old
    service remained untouched.

    R.

    Comment

    • Shaji Sethu

      #3
      Re: Web Service Versions

      Richard Thombs wrote:[color=blue]
      > I ended up tagging my .asmx files with a 'Vx' suffix, so I have
      > TeamHavenMobile V1.asmx, TeamHavenMobile V2.asmx etc, etc.
      >
      > Each new version started off as a direct copy of the code and then code
      > modified to add whatever new methods I wanted, thus ensuring that the old
      > service remained untouched.
      >
      > R.[/color]
      Thanks Richard to your response. The issue i have is that I approached
      web service from a different angle. Instead of creating a class and then
      exposing it as a web service I created all the schemas (xsd) and then
      manually create a WSDL and finally created a server stub from this to
      make the web service. In this approach the change management is highly
      dependent on the XML schemas and if I take the normal approach and
      version the schemas using namespace it breaks backward
      compatibailty.. ...so kind on in a roack and hard place and need a
      lateral thought to get out of this.

      /Shaji

      Comment

      • Shaji Sethu

        #4
        Re: Web Service Versions

        Shaji Sethu wrote:[color=blue]
        > Richard Thombs wrote:
        >[color=green]
        >> I ended up tagging my .asmx files with a 'Vx' suffix, so I have
        >> TeamHavenMobile V1.asmx, TeamHavenMobile V2.asmx etc, etc.
        >>
        >> Each new version started off as a direct copy of the code and then code
        >> modified to add whatever new methods I wanted, thus ensuring that the old
        >> service remained untouched.
        >>
        >> R.[/color]
        >
        > Thanks Richard to your response. The issue i have is that I approached
        > web service from a different angle. Instead of creating a class and then
        > exposing it as a web service I created all the schemas (xsd) and then
        > manually create a WSDL and finally created a server stub from this to
        > make the web service. In this approach the change management is highly
        > dependent on the XML schemas and if I take the normal approach and
        > version the schemas using namespace it breaks backward
        > compatibailty.. ...so kind on in a roack and hard place and need a
        > lateral thought to get out of this.
        >
        > /Shaji[/color]
        Any views from MS on what is the best practice to do this sort of stuff.

        /Shaji Sethu

        Comment

        • BjörnHolmberg

          #5
          Re: Web Service Versions

          Hello Shaji!

          Seems that .net proxies does not perform a validation against the wsdl (and xsd)
          found at the webservice endpoint. Because of this it's possible to add new
          functionality without breaking existing clients. If you need a more formal
          approach, check up on Programming .NET Components by Juval Löwy. The ideas you
          might need are in appendix A. The corresponding code example "Interface-based
          web services" can be found at: http://www.idesign.net.

          Regards
          Bjorn

          Shaji Sethu wrote:
          [color=blue]
          > Richard Thombs wrote:[color=green]
          > > I ended up tagging my .asmx files with a 'Vx' suffix, so I have
          > > TeamHavenMobile V1.asmx, TeamHavenMobile V2.asmx etc, etc.
          > >
          > > Each new version started off as a direct copy of the code and then code
          > > modified to add whatever new methods I wanted, thus ensuring that the old
          > > service remained untouched.
          > >
          > > R.[/color]
          > Thanks Richard to your response. The issue i have is that I approached
          > web service from a different angle. Instead of creating a class and then
          > exposing it as a web service I created all the schemas (xsd) and then
          > manually create a WSDL and finally created a server stub from this to
          > make the web service. In this approach the change management is highly
          > dependent on the XML schemas and if I take the normal approach and
          > version the schemas using namespace it breaks backward
          > compatibailty.. ...so kind on in a roack and hard place and need a
          > lateral thought to get out of this.
          >
          > /Shaji[/color]

          Comment

          Working...