Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / Web Services / May 2005

Tip: Looking for answers? Try searching our database.

creating a SOAP Fault

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
alex bean - 13 May 2005 19:19 GMT
Is there some way I can raise a true SOAP Fault? What I mean is, currently, I
am throwing an exception and letting IIS take care of sending the SOAP Fault.

This works but I would like to control the actual Fault message that is sent
back.  For example I would like to change the faultcode and faultstring.

I would like to do this from a web method as well as from within the filter
pipeline.
alex bean - 13 May 2005 19:45 GMT
I'm getting a little closer but I still don't complete control.

I found the System.Web.Services.Protocols.SoapException class.

This works well in a web method.  But when I raise one from within a custom
filter extra stuff is added.

Here is how I raise it:
throw new System.Web.Services.Protocols.SoapException
("Filter message",
new System.Xml.XmlQualifiedName("name","http://namespace"));

And here is what I get in the fault:
System.Web.Services.Protocols.SoapException: Filter message
at MyWSCustomFilter.MyWSCF.ProcessMessage(SoapEnvelope envelope) in
c:\documents and settings\abean\my documents\visual studio projects\
customfilterws\mywscustomfilter\class1.cs:line 24
at Microsoft.Web.Services2.Pipeline.ProcessInputMessage(SoapEnvelope
envelope)  
at
Microsoft.Web.Services2.WebServicesExtension.BeforeDeserializeServer(SoapServerMessage message)

How do I get rid of all the extra stuff.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.