Tally List : mailing list management, archiving, and analysis
click for archive home
 
Archive of:
CF-Server
Cold Fusion Server Tech
 
home
24 hour view
quick stats
weekly updates
 
all tallylists
corporate solutions
archive your favorite
help / feedback


Search the Tallylist search by keyword:

About Cold Fusion :
product's home
product's list home
 
  Archived TallyList / CF-Server: 
Subject: RE: Reading an XML file with CFHTTP
amittalwar@intellikaps.com (5p/+0r)     Posted: Saturday 05 May 2001
This post: 60 views, +0 rating

i encountered the same problem quite some time ago. And in my persual of solution to this i found some answers. maybe those can help you. 1. If the extension of the xml file you are trying to read is changed to ..txt or .cfm or anyother ascii format cfhttp will read the file successfully. 2. If the file is residing on another server where you cannot file ext then you can either try using mime type in cfhttp but i dunno if it works otherwise you can read the file and write the contents to a temporary file on yours server and then read the file using cffile.

-----Original Message----- From: Dave Watts [mailto:dwatts@figleaf.com] Sent: Sunday, May 06, 2001 12:00 AM To: CF-Server Subject: RE: Reading an XML file with CFHTTP

> I am trying to render an XML file but first I need to read it > using CFHTTP. While trying to do so, CFHTTP returns the following: > > "The requested file is not ASCII text and can not be rendered." > > The problem is that I cannot do anything with the variable returned by > CFHTTP, because it contains the specific text that I mentioned above.

With certain versions of CF, if you retrieve content from a remote server, but that server doesn't explicitly label it as a text MIME type, you won't be able to reference it with CFHTTP.FileContent. There are two solutions:

1. Upgrade to a later version. I believe this was fixed in CF 4.5.1 SP2.

2. Instead of simply referencing CFHTTP.FileContent, use CFHTTP to write it to a file, then use CFFILE to read that file and work with it as needed.

If you don't want to use either of those solutions, you can use a third-party HTTP component, if you like.

Finally, you'll want to make sure that you're actually returning what you think you should be getting - you can use method 2 to check this.

Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ voice: (202) 797-5496 fax: (202) 797-5444 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm ------------------------------------------------------------------------------ To unsubscribe, send a message to cf-server-request@houseoffusion.com with 'unsubscribe' in the body or visit the list page at www.houseoffusion.com


Similar Subject Line Posts (+/- two weeks of this post)
RE: Reading an XML file with CFHTTP  07 May 2001   (48 v/ +0 r)
RE: Reading an XML file with CFHTTP  05 May 2001 (this post)   (60 v/ +0 r)
RE: Reading an XML file with CFHTTP  05 May 2001   (51 v/ +0 r)
Reading an XML file with CFHTTP  04 May 2001   (38 v/ +0 r)
 

Send a reply to the CF-Server list!
click to send a reply! NOTE: Many lists will reject your post unless you have already registered with them. Also - don't forget the right account to send from (for those with multiple emails!)

Feedback: If this post was exceptionally helpful, please help by giving this post a positive review.

 

TallyList : copyright Ububik - 2000