I’m trying to call a web service in VFP 9.0 SP2. The site hosting the service is only available via HTTPS. I have used this service in ASP.NET projects with no issues but when I try to access it in VFP I get the following error.
Error: 1429 – OLE IDispatch exception code 0 from Connector: Connector:Bad certificate. HRESULT=0x800A1529 – Client:An unanticipated error occurred during the processing of this request. HRESULT=0x800A1529 – Client:Sending the Soap message failed or no recognizable response was received HRESULT=0x800A1529 – Client:Unspecified client error. HRESULT=0x800A1529..
Connector:Bad certificate. HRESULT=0x800A1529 – Client:An unanticipated error occurred during the processing of this request. HRESULT=0x800A1529 – Client:Sending the Soap message failed or no recognizable response was received HRESULT=0x800A1529 – Client:Unspecified client error. HRESULT=0x800A1529
Is there an issue with VFP and web services that require SSL?
Here is a bit of code I used to test the connection.
Here is a bit of sample code…
CLEAR
LOCAL lcEndPointURL
lcEndPointURL = "https://geocoding.bit-co.com/WS_Geo_v1/Service1.asmx?WSDL"
o = CREATEOBJECT("MSSoap.Soapclient30")
? o.MSSoapInit(lcEndPointURL)
? o.GetGeoCoderVersion
This results in the error above.
Here is a bit of VB.NET code-behind that works just fine (once the webservice is referenced).
Public Class About
Inherits System.Web.UI.Page
Dim wsGeo As New wsGeo.Service1
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Dim GCVersion As String = wsGeo.GetGeoCoderVersion
lblGCVersion.Text = GCVersion
End Sub
End Class
This code produces the expected results
I don’t know what is up with the URL, but I can only suspect that it is expecting to be passed a complete SOAP package/envelope to process before getting a response back. A very cool tool you might be interested in that can track internet communications during such debug working is called Fiddler. I’ve used it in a variety of project trouble-shooting problems and it might help you too.
It could also be some time-out issue too. I put the request in and check Fiddler and get nothing back… Like the site itself is not responsive. That said, I’m just putting the WSDL link into the browser directly, but it could be do to a blocked site at my end too. Fiddler might be able to better help on what the “raw” data coming back is and what might be missing.
Additionally, if it’s a subscriber type service, it COULD be actively rejecting the connection unless proper user/pwd information is provided by the connection. Sometimes it could even actively block based on specific IP addresses it does not have as “registered”.
UPDATE .. OPTION 2
Another option that might work well for you… Go to this site. Its West-Wind Technologies, owned/operated by Rick Strahl. He has been a Foxpro and Web guru since as long as I can remember (going back to 1993-94 area). He has a wwSOAP download tool to deal with SOAP objects. I think what you are running into is an OLD SOAP utility that MS doesn’t necessarily support / update for expanded soap / xaml / nested includes for xmlns: entries. This MIGHT be what you are hitting. The wwSOAP is written in VFP and his documentation and samples are typically excellent. I’d take a strong look at that too.