Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
MSSOAP Exception handling
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Web Services
Divers
Thread ID:
01005435
Message ID:
01005548
Vues:
16
Hi Rick,

I was aware of the points you raised (and had read the link you provided) but my test just doesn't give the expected results.

>>
Also, based on the error you describe below the call never makes it to the server. If you have a parameter violation the MSSOAP will captuire that on the client when marshallign the COM call into a SOAP message. It looks at the WSDL to do this, so if the signature doesn't match it will fail.
>>

The call does get to the server (I showed the MSSOAPT capture of the returned SOAP in my post). It's my own .NET service and I'm deliberately raising an exception. Here's my test service:
    <WebMethod()> _
Public Function ErrorTest(ByVal lcString As String) As String
        If lcString = "WRONG" Then
            Throw New SoapException("Forced error", SoapException.ServerFaultCode, "Test")
        End If
        Return "Hi"
    End Function
and here's the VFP client test code:
oSoap = CREATEOBJECT("MSSoap.SoapClient30")
*oSoap.MSSoapInit("e:\tmp\test.wsdl","BTRequest","BTRequestSoap")
oSoap.MSSoapInit("http://192.168.0.222/referrer/btrequest.asmx?wsdl","BTRequest","BTRequestSoap")
TRY
lcString = oSoap.ErrorTest("OK")
lcString = oSoap.ErrorTest("WRONG")	
CATCH TO e
  SET STEP ON 
ENDTRY
The first call works as expected. Second call, as expected, throws the exception in VFP.
e.message is : 'OLE IDispatch exception code 0 from Test: Forced Error' which is what I'd expect. *But* oSoap.FaultString is : 'Client:Incorrect number of parameters supplied for SOAP request'. Odd because I thought I'd relied on .FaultString in the past... Any ideas ?
Regards,
Viv
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform