I once got a Java http client working from within CF. Here's what I did to get it working: 1. Download the HTTPClient class files (.zip) from http://www.innovation.ch/java/HTTPClient/ 2. Extract to C:\jdk1.3\jre\lib\HTTPClient 3. Add C:\jdk1.3\jre\lib\ as "Class Path" in CF Admin 4. Run following CF code:
<cfobject action = "Create" type = "Java" class = "HTTPClient.HTTPConnection" name = "httpConn"> <cfscript> httpConn.init("www.windsorcs.com"); response=httpConn.Get("/"); content=response.getText(); </cfscript> <cfoutput> #content# </cfoutput> Voila! (I wonder why the method is called Get(), instead of get()...) ----- Original Message ----- From: "Keith Purtell" <[EMAIL PROTECTED]> To: "KCFusion (E-mail)" <[EMAIL PROTECTED]> Sent: Friday, January 11, 2002 9:31 AM Subject: [KCFusion] CFHTTP hopeless with proxy? Before I give up on CFHTTP, I'll offer this description of my problem and hope for a solution. We run CF5 on NT4 SP6a. It's a private server hosting our intranet. I built a simple template that would use CFHTTP to go out through our proxy server and test one of our public sites to make sure it was up and running. If not, it notifies me. Then I scheduled the template to run once an hour in the CF Admin. The template works fine if I use my browser to access it. However, called my the Scheduler, this template always fails to get past the proxy server, and instead returns "407 Proxy Authentication Required". I have established a user account on the proxy server and made sure to use the same username and password as I put in the tag. I have also checked the username/password used inside the Scheduler, and the username/password used by CF. The process only fails when the Scheduler tries to call the template, and CFHTTP tries to get past the proxy. There are a number of related threads on this in the Allaire forums. But the only solutions people have found were to either write their own CFX, or purchase the $150 Mabry HTTP/X and a related $50 custom tag. I can't do either right now. I approached someone in the forum who had written their own solution, but they didn't want to send me a copy. Just as frustrating, I can't find any record of these failures in the proxy log! This particular template is not mission critical, but if I can't make CFHTTP get past the proxy, then I can't use it elsewhere. Comments? <CFHTTP URL="http://www.domain.com/index.html" METHOD="GET" RESOLVEURL="No" PROXYSERVER="ip.address.here" PROXYPORT="8080" USERNAME="username" PASSWORD="password" THROWONERROR="No" TIMEOUT="120"> Keith Purtell, Web/Network Administrator VantageMed Operations (Kansas City) Email: [EMAIL PROTECTED] CONFIDENTIALITY NOTICE: This email message, including any attachments, is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply email and destroy all copies of the original message. ______________________________________________________________________ The KCFusion.org list and website is hosted by Humankind Systems, Inc. List Archives........ http://www.mail-archive.com/cf-list@kcfusion.org Questions, Comments or Glowing Praise.. mailto:[EMAIL PROTECTED] To Subscribe.................... mailto:[EMAIL PROTECTED] To Unsubscribe................ mailto:[EMAIL PROTECTED] ______________________________________________________________________ The KCFusion.org list and website is hosted by Humankind Systems, Inc. List Archives........ http://www.mail-archive.com/cf-list@kcfusion.org Questions, Comments or Glowing Praise.. mailto:[EMAIL PROTECTED] To Subscribe.................... mailto:[EMAIL PROTECTED] To Unsubscribe................ mailto:[EMAIL PROTECTED]