Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Add Error Handling to SOAP Proxy

Status
Not open for further replies.

tlhawkins

Programmer
Dec 28, 2000
797
0
0
US
Hey,

I've got a SOAP proxy created with wsdl.exe, I've never messed with any of the code in there. I've used it totally "black-box" style up until now.

What I want to do is check each call to see if one of 3 or 4 errors are returned, if so I need to simply repeat the call. I know, in a perfect world the service provider wouldn't return errors when everything was fine but it's not. So I need to repeat the call and it usually works the second time.

I assume that I would want to override the Invoke command, but not really sure how to go about that.

I could also add the checking at a higher level, but then I would have to do it in many places instead of just 1.

Could anyone help me get started with this?
Thanks

Travis Hawkins
 
I believe in .NET you can only get exceptions from SOAP as SoapException. If you want to deal with these a custom way then you can just include more info in the exception that gets tossed, or write a handler in your code to deal with this.

To throw a SOAP exception with custom info, check here
 
Thanks David,

it's funny, I was just finishing this up today. I added the error handling in at a higher level but I appreciate you getting back to me on this. The SoapException would work but I would still have to handle the error at a higher level so I guess I did about the same thing.


Travis Hawkins
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top