Friday, September 15, 2006

SOAPException class as WSDL SOAP Fault?

Recently I embarked on a seemingly simple mission. I wanted to explictly define a SOAP Fault to return a .NET SoapException. This turns out to be not so simple. In fact, after a few hours of experimentation, searching, and consultation I have still to come up with a decent answer. The search continues...

.NET and WSDL SOAP Faults

Recently I was working with a customer that wanted to explicitly define the SOAP Fault related to a failed web method call. I thought this would be simple since tools like WSDL.exe would provide the mechanism to handle the faults. Boy, was I wrong. It turns out that none of the 'mainstream' .NET WSDL tools handle SOAP Faults at all. If you generate a service from a WSDL file using "WSDL /server" it clears out all of the Fault references. So much for automation.