Welcome, Guest. Please login or register.
Did you miss your activation email?
05/23/12, 00:52
Home Help Search Login Register
News: Parsley Flex framework review featuring quiz application, in our Flex frameworks series
Flex SDK 4.5 mobile roadmap: begin with your mobile development
Swiz Flex framework review featuring quiz application
New homepage we release our new Homepage, take a look ...

+  Flash-db
|-+  Server side Scripting and Database Support
| |-+  Web Services: XML, Soap, WSDL, UDDI, and Flash Integration (Moderators: Flash-db, Musicman, vesa kortelainen, Ronald Wernecke, Jorge Solis)
| | |-+  proxy script for grabbing XML using CF.
0 Members and 1 Guest are viewing this topic. « previous next »
Pages: [1] Print
Author Topic: proxy script for grabbing XML using CF.  (Read 2785 times)
tudd
Server what's that
*
Posts: 2



View Profile WWW Email
« on: 04/09/02, 12:17 »

I can get a XML document using ColdFusion and CFHTTP...

question is what kind of variable do I put the resulting XML content into...

and then how do I reference that with flash?


the XML resides on a third party domain and I need to supply my site with it's content.
Logged
Flash-db
Administrator
Systems Administrator
*****
Posts: 1867



View Profile WWW
« Reply #1 on: 04/09/02, 21:41 »

As long as your able to grab the info from the other site using a CF script - then you could do something like this:

myXML = new XML();
myXML.onLoad = convertXML;

myXML.load("YourCFXMLGrabberScript.cfm");

function convertXML () {

......

}

The script goes out - grabs the XML.  You could not have to assign any type of variable in this case - You would only want to grab the exact format and content of the XML on the other site - then print it out to the script the same way.  That will then be read in by Flash - and you can do all that XML conversion/formatting stuff just like on your other flash movie that your using on a different site.
Logged

-Jeff.
tudd
Server what's that
*
Posts: 2



View Profile WWW Email
« Reply #2 on: 04/12/02, 09:11 »

after the load function and before the convert function

is there a way to error check to see if the file was loaded or in the convert function to tell if the XML returned was not in error?

I want to display error message if the document was unretreivable or in error in any way.
Logged
Flash-db
Administrator
Systems Administrator
*****
Posts: 1867



View Profile WWW
« Reply #3 on: 04/18/02, 20:25 »

Yes you can either build that part into your CF script - or into the Flash client.  Since you have to use a proxy script in this case it might be best to do this in your CF script.  

It's just going to be a simple If/Else statement - Like if it was successful print out the xml - else print out an error message to send back to flash.

A way to test this initially is to just type in the URL to the CF script and make sure that everything is being printed out to the screen correctly.
Logged

-Jeff.
Pages: [1] Print 
« previous next »
Jump to:  


Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!