Removing extra information from Soap Exception

S

Siobhan

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
 
G

Guest

Hi Siobhan!

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

D. Barisch
 
S

Siobhan

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
 
G

Guest

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
 

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

Forum statistics

Threads
473,769
Messages
2,569,576
Members
45,054
Latest member
LucyCarper

Latest Threads

Top