0
我想如何正确地捕捉肥皂异常。我只能将它作为system.net.webexception(Error 500 HTTP)捕获,但不能作为soapheaderexception或soap异常捕获。捕捉SOAP异常.NET
我当前的代码是:
Try
'Code
Catch soapExcpHeader As System.Web.Services.Protocols.SoapHeaderException
'Can't catch here
Dim error_desc As String = soapExcpHeader.Detail.OuterXml
Throw New System.Web.Services.Protocols.SoapHeaderException()
Catch soapExcp As System.Web.Services.Protocols.SoapException
'Can't catch here
Dim error_desc As String = soapExcp.Detail.OuterXml
Throw New System.Web.Services.Protocols.SoapException
Catch webExcp As System.Net.WebException
'Here I catch
Console.WriteLine(webExcp.ToString())
Throw webExcp
Catch ex as Exception
'Other types of exceptions
Throw ex
End Try
一如既往感谢您的答复。