0

Say i'm having a web service that accepts two arguments and that is being called/consume in my application. Now after some time, the web service changes and accepts three arguments, hence in my application, would that be throwing an error, or i need to just update the web reference, or i need to recreate a web serivce or would that be working fine?

Let me know if any doubts

Thanks!

xorpower
  • 17,975
  • 51
  • 129
  • 180

2 Answers2

0

You could add optional parameters where if a parameter value isn't given to the method a default value is used.

SquidScareMe
  • 3,108
  • 2
  • 24
  • 37
  • If you go this route you may want to read this: http://stackoverflow.com/questions/995521/asp-net-web-service-optional-parameters – SquidScareMe May 13 '11 at 11:30
0

From a "pure" architectural aspect, you should never change the signature of a method of a service once it's in use. You should version by creating a new method with a different namespace. But staying pure is sometimes difficult to do.

In your case you need to update the Web reference in the client application and then modify the code to pass in the appropriate parameter to the method in the service proxy.

Rob Windsor
  • 6,744
  • 1
  • 21
  • 26