Use of FaultBinding class

  • Thread starter Emanuele Parati
  • Start date
E

Emanuele Parati

I have a WebMethod that can rise SoapException (eg.: Client.DataNotFound)
I'd like to insert this information in the WSDL under the portType and Binding
Tag.

I found the class FaultBinding, but how can I use it?

Thanks in advance,

Emanuele (Italy)
 
J

Jan Tielens

Throwing SoapExceptions:
Sometimes things can go wrong when code is executed, so Exceptions are
thrown. When your application exposes services through a webservice layer,
SoapExceptions are thrown from the server to the client. By default normal
Exceptions are converted to a SoapException, resulting in a rather ugly
Exception containing all information concatenated in a long String. But
luckily the SOAP protocol allows any XML document to be included in SOAP
error messages. This article shows how to build some helper classes to
easily pass error information from the server to the client through a
webservice layer.
http://www.microsoft.com/belux/nl/msdn/community/columns/jtielens/soapexcept
ions.mspx

--
Greetz

Jan Tielens
________________________________
Read my weblog: http://weblogs.asp.net/jan
 
E

Emanuele Parati

Thanks for your answer. The article is very useful.
But I'd like to generate the WSDL for the SoapException I throw.
For example: if in the Add Web Method I throw the SoapException with:
code: Client.dataNotFound
description: data not found!!
I'd like to have the WSDL (those generated automatically by
ASP.NET framework) with the soap:fault tag under portType and
Bindings.
Is there a way to do so?
If so, where can I find an article describing the way?

Thanks a lot,

Emanuele
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,816
Latest member
SapanaCarpetStudio

Latest Threads

Top