4

I've a web service SOAP developed with WCF, there is a best practise to versioning it? when I change the contract I don't want to update all the client's referiments but I want simply publish a new version that coexists with the old.


STUDY-CASE: I've a web service with one endpoint, all clients point to it, soon I will have to change the contract and I search a way to avoid that all clients crash. I know two ways to avoid this:

  • publish the web service with the new contract in another server
  • create a new file svc with the new contract

there are other ways?

  • Sharing your research helps everyone. Tell us what you've tried and why it didn’t meet your needs. This demonstrates that you’ve taken the time to try to help yourself, it saves us from reiterating obvious answers, and most of all it helps you get a more specific and relevant answer. Also see How to Ask – gnat Oct 9 '14 at 14:36
  • 1
    Hi gnat. I've edit my question, I hope it is clearer. – Guerra Oct 9 '14 at 15:13
2

It depends on many things such as what changes you are going to make, what platform your clients are built on, what's your change tracking policy, etc.

For example if you just want to add a new property to a data contract or a new operation to a service contract it's safe to add it to your current implementation as long as the clients are version tolerant (DataContractSerializer is version tolerant) and it complies with your change tracking policy. However you would better stick to strict versioning strategy which requires creating a new contract and exposing it with a new endpoint in case the changes are more serious.

I suggested reading these articles:

Versioning Strategies
Best Practices: Data Contract Versioning

This should help you to choose the right version strategy and provide your with the best practices to follow.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.