Professional Web Applications Themes

Removing extra information from Soap Exception - ASP.NET Web Services

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("Unabl e to login: " & ex.Message, System.Web.Services.Protocols.SoapException.Server FaultCode) 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...

  1. #1

    Default Removing extra information from Soap Exception

    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("Unabl e to login: " & ex.Message,
    System.Web.Services.Protocols.SoapException.Server FaultCode)


    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

    Siobhan Guest

  2. #2

    Default Re: Removing extra information from Soap Exception

    Hi Siobhan!

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

    D. Barisch


    Guest

  3. #3

    Default Re: Removing extra information from Soap Exception

    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

    "Daniel Barisch" wrote:
    > Hi Siobhan!
    >
    > Use the SoapException.Detail (XML-Node) to store your exeption-infos and
    > extract it back on the client!
    >
    > D. Barisch
    >
    >
    >
    Siobhan Guest

  4. #4

    Default Re: Removing extra information from Soap Exception

    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


    Guest

Similar Threads

  1. exception when removing MDIWindow
    By yogini2212 in forum Macromedia Flex General Discussion
    Replies: 1
    Last Post: April 8th, 09:52 AM
  2. SOAP Exception
    By Roger C. in forum ASP.NET Web Services
    Replies: 0
    Last Post: April 26th, 08:30 PM
  3. information schema extra fields
    By Ron Peterson in forum PostgreSQL / PGSQL
    Replies: 2
    Last Post: December 11th, 04:16 AM
  4. Strange SOAP Exception
    By Barry Christian in forum ASP.NET Web Services
    Replies: 1
    Last Post: November 18th, 11:17 PM
  5. Soap Exception Q
    By Vai2000 in forum ASP.NET Web Services
    Replies: 0
    Last Post: February 20th, 04:33 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139