Results 1 to 4 of 4

Thread: [2005] Throw Exception From Web Service

  1. #1

    Thread Starter
    Hyperactive Member Jonny1409's Avatar
    Join Date
    Mar 2005
    Posts
    308

    [2005] Throw Exception From Web Service

    Hello,

    I have a problem in as much as my message that is being thrown from my class, to my webservice, to my application isn't showing in the friendly format - it is showing a large box with things like system.web.services.protocols.soapexception.......

    It does contain the text of my error, but I need it to look nice to the users.

    My code is as follows :

    Class
    Code:
    Try
    IF
       Do stuff...
    Else
       Throw New System.Exception("An Employee with this Reference already exists!")
    End If
    
    Catch ex As Exception
       Throw ex
    End Try
    WebService
    Code:
    Try
       Call Class.....
    Catch ex As Exception
       Throw ex
    End Try
    Application
    Code:
    Try
       Do Stuff......
    Catch ex As Exception
       MessageBox.Show(ex.Message)
    End Try
    Can anyone help please ?

  2. #2
    Hyperactive Member vbud's Avatar
    Join Date
    Jan 2002
    Location
    Mru 20 17S, 57 33E Goal: Get out of the BOX Status: In The Shadows!!! Target Posts: 3,000,000,000
    Posts
    378

    Re: [2005] Throw Exception From Web Service

    Can you please post the exact error message? I think that the problem maybe that you are not passing the correct SOAP message to or from the web service. Either types or names are different.
    >!v!<
    Free your mind, stop thinking
    http://inspirone.blogspot.com

    Please rate this post if it helped you

  3. #3

    Thread Starter
    Hyperactive Member Jonny1409's Avatar
    Join Date
    Mar 2005
    Posts
    308

    Re: [2005] Throw Exception From Web Service

    Sure - the message is attached:

    I've tried putting a watch on "ex" and in the class it simply shows as "An Employee with this Reference already exists!"

    In the Webservice is simply shows as "An Employee with this Reference already exists!"

    But on my application's form it shows as per the screenshot and I've no idea why.
    Attached Images Attached Images  

  4. #4

    Thread Starter
    Hyperactive Member Jonny1409's Avatar
    Join Date
    Mar 2005
    Posts
    308

    Re: [2005] Throw Exception From Web Service

    Hi vbud,

    I've had a look for details relating to passing SOAP Messages, but haven't really found anything useful.

Posting Permissions

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



Click Here to Expand Forum to Full Width