Hello, I have a coldfusion app that's using the CTCT API to add email addresses and update lists.
I have a development server and a production server that I'm using, but for some reason my development server can't connect to the API, where as the production server seems to behave fine.
Using the provided Coldfusion sample code, my development server receives a "Connection Failure" during the CTCTRequest function which causes an XML parse error when xmlParse() is called.
This doesn't seem to happen on my local development or my production server however.
Could someone provide input on how I could fix this issue?
My dev server is runnig IIS 6.0 with Windows Server 2003.
Based on what you've described, this sounds like it may be an issue with the SSL certificates on your server. If they are out of date, then the SSL verification required to connect to the Constant Contact API can fail. You most likely could resolve the issue if this is the case by updating the server's root certificate which is normally done through windows update.
Another thing to try is to see if you can load https://api.constantcontact.com/ in a browser. If it loads you should see a 596 service not found error.
API Support Specialist
If we are testing locally on a development machine (and have local certificates) how do we test the Constant Contact API without getting 596 Service Not Found errors?
Your local certificates aren't the issue. It is CFHTTP needing a recognized/installed certificate for the destination URL to create the SSL connection.
Here's the description and steps from Adobe. Obviously, path locations change if you are on Linux.
To use HTTPS with thecfhttptag, you might need to manually import the certificate for each web server into the keystore for the JRE that ColdFusion uses. This procedure should not be necessary if the certificate is signed (issued) by an authority that the JSSE (Java Secure Sockets Extension) recognizes (for example, Verisign); that is, if the signing authority is in the cacerts already. However, you might need to use the procedure if you are issuing SSL (secure sockets layer) certificates yourself.
Manually import a certificate
You need to add the Constant Contact SSL certificates to your CF keystore. It is a common problem with many remotes services and the different SSL certs used and the ones included with CF that CFHTTP uses for https.