0

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?

1 Answer 1

1

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.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.