Search code examples
coldfusioncfmlcfhttp

ColdFusion - CFHTTP (https) sending request over port 80


I am using CFHTTP to connect to a server and post some parameters. I have successfully imported the certificate.

<cfhttp url="https://xml.proveid.experian.com/IDSearch.cfc" method="post" result="response" port="443">
    <cfhttpparam type="Header" name="Accept-Encoding" value="*"> 
    <cfhttpparam type="header" name="content-length" value="#len(arguments.xml)#"  />   
    <cfhttpparam type="xml" value="#trim(arguments.xml)#" />
</cfhttp>

As you can see the request is for port 443 but the error I got back is:

struct Charset [empty string]
ErrorDetail Connect Exception: Connect to xml.proveid.experian.com:80
[xml.proveid.experian.com/194.60.180.108]
failed: Connection timed out: connect
Filecontent Connection Failure Header [empty string]
Mimetype Unable to determine MIME type of file.
Responseheader struct [empty]
Statuscode Connection Failure. Status code unavailable.
Text YES Connection Failure. Status code unavailable.

Can anyone explain why the request is made on port 80?


Solution

  • It seems that the specific web service doesn't play well with CFHTTP. So this approach solved the problem.

    <cfset args.xml = 'xml value'>
    
    <cfinvoke 
                    webservice="https://xml.proveid.experian.com/IDSearch.cfc?wsdl"
                    method="search"
                    returnvariable="aTemp"
                    argumentCollection="#args#"> 
    
    </cfinvoke>