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 / February 2005

Tip: Looking for answers? Try searching our database.

Removing extra information from Soap Exception

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Siobhan - 19 Feb 2005 18:37 GMT
Hi
In our web service we cath and throw exceptions to the class as follows:
       Catch ex As Exception
               Throw New
System.Web.Services.Protocols.SoapException("Unable to login: " & ex.Message,
System.Web.Services.Protocols.SoapException.ServerFaultCode)

Then in our class we catch the Soap exception, howbere the message of this
exception always starts with System.Web.Services.Protocols.Exception:

Is there anyway to remove this information, especially if we are passing
back a filaed login we don't want to confuse the user, but even with other
exceptions this information is not needed for the user
Thanks
Daniel Barisch - 22 Feb 2005 06:41 GMT
Hi Siobhan!

Use the SoapException.Detail (XML-Node) to store your exeption-infos and
extract it back on the client!

D. Barisch
Siobhan - 22 Feb 2005 09:15 GMT
Hi Daniel
Sorry to be a pain but would you have a sample of this - I am not very
familiar with XML as yet
Cheers
Siobhan

> Hi Siobhan!
>
> Use the SoapException.Detail (XML-Node) to store your exeption-infos and
> extract it back on the client!
>
> D. Barisch
Daniel Barisch - 23 Feb 2005 11:51 GMT
Hello Siobhan!

| Sorry to be a pain but would you have a sample of this - I am not very
| familiar with XML as yet

Then I think it's a good time to get a little familiar with it. If you
really want to understand Soap-based WebServices there's no other way ...

Just have a look at the System.Xml-Namespace in the Framework!

D. Barisch

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.