• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Help! CFHTTP

New Here ,
Aug 28, 2006 Aug 28, 2006

Copy link to clipboard

Copied

Hello,

I am in the midst of migrating from BlueDragon to ColdFusion, and I ran across a problem connecting to a remote site via CFHTTP. I am posting XML to the remote site using formfield CFHTTPPARAMs. The code works in BlueDragon, and it works if I connect using http rather than https in ColdFusion (though I cannot connect using http to the production site for security reasons). I am running CFMX 7.02 on Windows.

Attached is the code I use to post. Here is the response:

Charset: [empty string]
ErrorDetail: I/O Exception: Premature EOF encountered
Filecontent: Connection Failure
Header: [undefined struct element]
Mimetype: Unable to determine MIME type of file.
Responseheader: struct [empty]
Statuscode: Connection Failure. Status code unavailable.
Text YES

I have tried importing the site's certificate into the \jrun4\jre\libs\security\cacerts file, thinking that the problem might be an unrecognized certificate, but that didn't help. The site's certificate was issued by Thawte Premium Server CA.

Any suggestions? This could be a major problem with migration if I can't find a resolution.

Thanks in advance for your help,

-- Jim C.
TOPICS
Advanced techniques

Views

649

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Aug 28, 2006 Aug 28, 2006

Copy link to clipboard

Copied

First off you dont need to declare all of this:

charset="UTF-8" useragent="Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; .NET CLR 2.0.50727)

Second:

Is your XML valid? If you were to cfdump what you are posting, is it formatted correctly? Try using CFXML to create the xml data and them post that . Also try using CDATA to validate the data as well.

HTH

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Aug 28, 2006 Aug 28, 2006

Copy link to clipboard

Copied

I know I don't need the charset, etc. That was added on the off chance that it would fix the problem. I have had problems with accessing the Yahoo Maps! service via cfhttp which were resolved by explicitly setting the charset. The XML is formatted properly -- it is being consumed by the remote service under BlueDragon with no problem. Further, the error I am getting isn't a parsing error from the remote server, the connection isn't working to begin with. The administrator on the remote server doesn't even see my connection attempts. Also, if I do the exact same thing with http:// instead of https://, it works. That is what initially made me think of the problem with the certificate registration.

Has anyone else seen this error when trying to connect via https when using CFHTTP?

Thanks in advance for the help.

-- Jim C.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Aug 29, 2006 Aug 29, 2006

Copy link to clipboard

Copied

Anyone? Bueller? Bueller?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Aug 30, 2006 Aug 30, 2006

Copy link to clipboard

Copied

LATEST

Have you tried something very simple to see if it's your code?

For example, try something like this...

<cfhttp url="https://banking.wellsfargo.com" method="GET" ></cfhttp>
<cfoutput>#cfhttp.fileContent#</cfoutput>


Good luck!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation