Copy link to clipboard
Copied
I've written a page in cold fusion that returns XML. It works great. In my development environment CF8 developer's version on my Windows XP desktop it's great. On a development server running CF8 on BEA it works great. On another development server running CF7 on BEA it seems as if my tag <cfcontent type="text/xml" reset="YES"> is being ignored. Running the app in Firefox the content type is always being returnes as "text/html". In my CF7 environment, I looked in the "Security -> Sandbox Security" settings to see if anything is set up there for cfcontent and it looks great there also. Any clues from the knowledgable folks here? Thanks in advance if you've see this before!
Copy link to clipboard
Copied
I would find out if the BEA server rewrites HTTP headers. If the code is the same perhaps there is a difference in how BEA serves HTTP requests vs your local dev server.
A sample of your code would also help in troubleshooting your issue.
Message was edited by: JR "Bob" Dobbs
Copy link to clipboard
Copied
Thank you JR for your time thinking about my problem. I appreciate it! Hope you have some nice quality tobbaco for your pipe.
Strange that on the BEA server hosting Cold Fusion 8 I have no problem. It's only on the BEA server hosting Cold Fusion 7.
I am using the function
<cfcontent type="text/xml" reset="YES">
to set the content to text/xml, and simply outputting my variables in XML that I'm authoring, such as the following:
<var_date>#DateFormat(return_query.var_date, "yyyy-mm-dd")#</var_date>
It's actually very simple stuff. I'm not using any of the Cold Fusion xml functions, just simply writing XML just as I would write HTML for a web page. The XML is all valid and works great.
Copy link to clipboard
Copied
Does your output include the XML declaration? If not, perhaps adding one might make a difference.
Copy link to clipboard
Copied
Oh yes. The XML is beautiful! I even have written a program to call the web service and parse the XML validated against a schema and it's fantastic. IE reads the text/html as XML because apparently it ignores the content type on the page and when it sees <?xml version="1.0" encoding="ISO-8859-1"?> at the top of the page it knows to display the content as XML regardless of the content type being reported by the web server.
As I say - the only problem is that the content type is retuning as html.
I'm going to work with our web infrastructure group to dig into the web server and BEA settings to see if there's a server setting somewhere.