views:

185

answers:

2

I have a standard (?) web service client solution in .net 2008 = classes created by wsdl.exe tool after downloading the wsdl-file from web service I'm using. I then just call the method of this automatically created class that inherits System.Web.Services.Protocols.SoapHttpClientProtocol and its' invoke method. which I have tested a lot in test environment. The "problem" is that it always works. I mean, I don't think I can just assume it will always work in production enviroment, too but should add some kind of error/exception handling but the question is: how to do it?

A: 

Anyone? :D

+1  A: 

wrap the call to your webservice in a

try {

} 
catch {

}

block.

You can catch the web service abort specific exception and then inspect the inner exceptions to find out what actually happened.

ck