0

I have got an asmx which is a Proxy, I use it to consume a Web Service. I have got the calls to the methods of the Web Service in the app_code. I have not the control of the Web Service and when the Web Service changes the specifications(for example a method with two parameters, now it has got 3 paramaters, it is changing the headers), my entire application is going down. It is not compiling, because I have a call to a method with 2 parameters, but this method has changed to 3 parameters. Any idea, how to isolate the error or how to catch it o how to do in order not to go down all the app I am using aspnet framework 4 and c# Thanks.

Za7pi
  • 1,338
  • 7
  • 22
  • 33
  • how come you don't refresh the webservice url by right clicking on it and getting the updated version of the web service..? also can you show the code / method call in the 2 different scenarios..? – MethodMan Oct 26 '15 at 20:30
  • Yes, updating the reference it is done, but when I realize that it has changed, the web is down – Za7pi Oct 26 '15 at 20:31
  • 1
    Create a proxy method that takes two parameters and call the web method with 3 parameters. By the way, whoever is publishing this service needs a lesson on maintaining compatibility. – Ron Beyer Oct 26 '15 at 20:31
  • I know it, but I can not give him/her any lessons, so, the problem is still there – Za7pi Oct 26 '15 at 20:34
  • And I think that it is not going to happen, or it is going to happen not so many times, but... if it happens? – Za7pi Oct 26 '15 at 20:36
  • what do you mean you can't give `him/her` `any lesson...?` sounds like you need to have better communication with whomever you're consuming their web service..also if they add an extra param to a method that you are using then perhaps they need to understand method overloading.. – MethodMan Oct 26 '15 at 20:47
  • take a look here and pass in a string[] as parameter http://stackoverflow.com/questions/2730482/passing-a-web-service-an-unknown-number-of-parameters – MethodMan Oct 26 '15 at 20:55

0 Answers0