Ciao ho una serie di webServices e adesso che sono diventati operativi devo implementarne la gestione degli errori.
Come faccio?
Qualcuno conosce la gestione errori in SOAP?codice:<WebMethod(BufferResponse:=False, Description:="Retreive Addresses by Typing the Name.", MessageName:="FindAddress_Name")> _ Public Function FindAddress(ByVal bName As String) As DataSet 'Gestore eccezioni SOAP Dim CN As New OleDbConnection(System.Configuration.ConfigurationSettings.AppSettings("connAS")) Dim CMD As New OleDbCommand Dim DA As OleDbDataAdapter Dim DS As New DataSet Dim strQry As String strQry = "SELECT * " strQry += "FROM GL400.INDIR00F " strQry += "WHERE NAME1 LIKE '" & bName.ToUpper & "%' " strQry += "ORDER BY CODE" With CMD .Connection = CN .CommandText = strQry End With DA.SelectCommand = CMD Try DA.Fill(DS) CN.Close CN = Nothing Return DS Catch ex As Exception 'Throw New SoapException(ex.Message, New XmlQualifiedName("SoapHeader")) Response.Write(ex.Message) End Try End Function
Grazie.


Rispondi quotando