Background: I'm running CF 4.5 on a Linux box with Apache.

I'm using <CFHTTP> to post a query to a Linux server, which runs a compiled
program to return some XML as a response.  I'd like to take the response and
convert part of it into a CF variable that I can then do things with in CF
(e.g., display somewhere on a web page as HTML).

I've pursued some approaches using CFWDDX, but since the XML I'm getting
back from the server is so simple, (and since it's not coming back as WDDX
in the first place) I'd rather not pursue setting of Xalan/Xerces to run
with Apache or do the Java required to make it work with CF. I'd also like
to pursue a less costly solution before moving on to robust yet relatively
expensive solutions like that offered by Granularity.

The request I'm running through CF looks like this:

1:  <cfhttp url="http://10.10.10.12/process/query" method="POST" port="1000"
resolveurl="false">
2:  <cfhttpparam type="URL" name="id" value="1234">

When I try to display the result using <CFOUTPUT> and #cfhttp.FileContent#,
I get the following error:

    The requested file is not ASCII text and can not be rendered.

Additionally, when I check the statuscode on the request, I get the
following:

    200 Succes

[Note the misspelling!]

Apparently, both these messages are generated by CF server. I next verified
the header information of the incoming http packet, which read:

    HTTP/1.1 200 OK
    Content-Type: text/xml

I then changed some of the code that generates the response, because I
thought the problem might be due to the incoming XML not being understood by
CF, so it now reads

    HTTP/1.1 200 OK
    Content-Type: text/html

I thought that I would fool CF into thinking the incoming text was simply
HTML, but I still get the same error as before, "The requested file is not
ASCII..."

When I check the MIME type of the incoming data (in both cases) I get the
following error:

    Unable to determine MIME type of file

However, if I do #len(cfhttp.filecontent)#, I get the length of the incoming
data successfully.

The data coming in looks like:

<response>
  <success>1</success>
  <account>300</account>
</response>

Does anyone have any ideas on how to solve this problem? If I could just get
CF to ingest the response information, I can move on to trying to parse it
using regular expressions.

Thanks for any and all suggestions!

James


-----Original Message-----
From: McCollough, Alan [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, January 30, 2001 2:34 PM
To: Fusebox
Subject: RE: clustercats (and fusebox)


Actually, I have, twice. In both instances, I had to deal with the complex
variable WDDX thing, and indeed, I did have one text sentence that ended in
"session." But it really does come down to a global find -n replace.

The most important thing, though, is certainly to create a .zip backup of
the entire app -before- you do the replace!

Alan McCollough
Web Programmer
Allaire Certified ColdFusion Developer
Alaska Native Medical Center

> -----Original Message-----
> From: [EMAIL PROTECTED] [SMTP:[EMAIL PROTECTED]]
> Sent: Tuesday, January 30, 2001 12:42 PM
> To:   Fusebox
> Subject:      RE: clustercats (and fusebox)
>
> First:
> Have you ever *tried* this on a larger app? I know in theory it works, but
> there's just something that makes me uneasy about doing a global search &
> replace.
>
> Second:
> What happens if "session" happens to be at the end of a sentence? :)
>
>
> Shannon Hicks
> Senior Developer
> Allaire Certified ColdFusion Developer
> [EMAIL PROTECTED]
>
> duoDesign, The eBusiness Accelerator
> 1007 Church St. Suite 510
> Evanston, IL 60201
> 847.491.3211
> 847.491.3100 fax
>
> http://www.duodesign.com/
> http://www.chicagoangels.org/
>
>
> -----Original Message-----
> From: McCollough, Alan [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, January 30, 2001 2:48 PM
> To: Fusebox
> Subject: RE: clustercats (and fusebox)
>
>
> You wanna know how hard it is to remediate those apps?
>
> FIND "session."
> REPLACE WITH "client."
> And there ain't much more to it than that.
>
> Alan McCollough
> Web Programmer
> Allaire Certified ColdFusion Developer
> Alaska Native Medical Center
>
> > -----Original Message-----
> > From:       Kelly Tetterton [SMTP:[EMAIL PROTECTED]]
> > Sent:       Tuesday, January 30, 2001 10:29 AM
> > To: Fusebox
> > Subject:    RE: clustercats (and fusebox)
> >
> > Appreciated -- and we are now using client vars for all of our current &
> > future apps; but we have many *legacy* apps using session vars.
> >
> > -----Original Message-----
> > From: Hal Helms [mailto:[EMAIL PROTECTED]]
> > Sent: Tuesday, January 30, 2001 12:37 PM
> > To: Fusebox
> > Subject: RE: clustercats (and fusebox)
> >
> >
> > Kelly,
> >
> > The problem with sticky sessions in general is that it goes against the
> > idea
> > of clustering and replication across multiple machines. These problems
> can
> > be solved if, instead of session variables, you use client variables and
> > store this information in a central database.
> >
> > Hal Helms
> > == See ColdFusionTraining.com for info on "Best Practices with
> ColdFusion
> > &
> > Fusebox" training ==
> >
> >
> > -----Original Message-----
> > From: Kelly Tetterton [mailto:[EMAIL PROTECTED]]
> > Sent: Tuesday, January 30, 2001 12:18 PM
> > To: Fusebox
> > Subject: OT: clustercats (and fusebox)
> >
> >
> > Has anyone used a fusebox app in a clustercats environment?
> >
> > Also, we have several legacy apps that use session variables, and
> although
> > it seems clear that we can use sticky sessions for those, I've been
> ready
> > that clustercats can't handle sticky sessions *and* absolute urls (ie,
> for
> > ssl checkouts) and that it can only handle up to 4 virtual web sites on
> a
> > single machine -- but this info might be outdated.
> >
> > Anyone?
> >
> > Kelly Tetterton
> > [EMAIL PROTECTED]
> > http://www.duodesign.com
> >
> > duoDesign eBusiness Accelerator
> > 1007 Church Street, Suite 510
> > Evanston IL 60201
> >
> > 847-491-3142 direct
> > 847-491-3000 main
> > 847-491-3100 fax
> >
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to