Atlanta Custom Software Development 

 
   Search        Code/Page
 

User Login
Email

Password

 

Forgot the Password?
Services
» Web Development
» Maintenance
» Data Integration/BI
» Information Management
Programming
  Database
Automation
OS/Networking
Graphics
Links
Tools
» Regular Expr Tester
» Free Tools


Click here to copy the following block
' Extract the name of the SoapException's (the type of exception thrown by a
' web service) "inner" exception.
'
' Example:
'  Try
'    ' this call throws an exception
'    Dim service As New localhost.SampleService()
'    service.ThrowAnException()
'  Catch ex As SoapException When ex.Code.Equals
' (SoapException.VersionMismatchFaultCode)

'  Catch ex As SoapException When ex.Code.Equals(SoapException.ServerFaultCode)
'    lblMessage.Text = "SOAP Exception: " & ex.Message
'  Catch ex As SoapException When GetWSException(ex) =
' "System.NullReferenceException"
'    ' get details from the OuterXml property
'    lblMessage.Text = ex.Detail.OuterXml
'  End Try

Function GetWSException(ByVal ex As System.Web.Services.Protocols.SoapException) _
  As String
  ' parse the exception's Message property.
  Dim mc As System.Text.RegularExpressions.MatchCollection = _
    System.Text.RegularExpressions.Regex.Matches(ex.Message, _
    "---> ([^:]+):")
  If mc.Count >= 1 Then
    ' we've found a match - the first ground contains the value.
    Return mc.Item(0).Groups(1).Value
  End If
End Function


Submitted By : Nayan Patel  (Member Since : 5/26/2004 12:23:06 PM)

Job Description : He is the moderator of this site and currently working as an independent consultant. He works with VB.net/ASP.net, SQL Server and other MS technologies. He is MCSD.net, MCDBA and MCSE. In his free time he likes to watch funny movies and doing oil painting.
View all (893) submissions by this author  (Birth Date : 7/14/1981 )


Home   |  Comment   |  Contact Us   |  Privacy Policy   |  Terms & Conditions   |  BlogsZappySys

© 2008 BinaryWorld LLC. All rights reserved.