boze
06-16-2004, 12:18 PM
I have several web services set up for me by a cold fusion person i'm working with and I haven't managed to get to first base as far as consuming the data.
I'm trying to use the Tip Of The Day (http://www.macromedia.com/devnet/mx/flash/articles/tipoday_pt2.html) web service tutorial by Jen deHaan as an example but I'm running into a few different problems.
The first problem occurs when I'm trying to recreate the simple web service connector without using the Slide Presentation mode that's used in the tute.
There's an on(load) function that only contains some formatting, yet if I remove it and put it in a keyframe (without the on(load) part) I get what has come to be my classic error message, "Error opening URL..." and then the url of the web service. Even though this is the same url that works if the formatting is left onLoad with the slide. Here's the code straight from the tute that offends somehow when used straight on a keyframe and without the clip event:onClipEvent (load) {
//_global.__dataLogger = new mx.data.binding.Log();
this.dataHolder_dh.tipdate_str = dateFormat(new Date());
function dateFormat(dDate:Date):String {
var nYear = dDate.getFullYear();
var nMonth = dDate.getMonth()+1;
var nDay = dDate.getDate();
if (nMonth<10) {
nMonth = "0"+nMonth;
}
if (nDay<10) {
nDay = "0"+nDay;
}
return new String(nMonth+"/"+nDay+"/"+nYear);
}
var flash_css = new TextField.StyleSheet();
flash_css.setStyle(".text", {fontFamily:'Arial,Helvetica,sans-serif', fontSize:'11px', color:'#000000'});
flash_css.setStyle(".title", {fontFamily:'Arial,Helvetica,sans-serif', fontSize:'16px', color:'#999999', fontWeight:'bold'});
flash_css.setStyle("a", {fontFamily:'Arial,Helvetica,sans-serif', fontSize:'11px', color:'#0000FF'});
flash_css.setStyle("a:hover", {fontFamily:'Arial,Helvetica,sans-serif', fontSize:'11px', color:'#336699'});
this.tip.TipText_txt.styleSheet = flash_css;
} The other problem I'm having is a general lack of familiarity with setting up my bindings and schema, but if I could even get one array in from this web service I'd be happy to muck around with the rest of it until it played nice just by trial and error. Unfortunately, when all I get is "Error opening URL" I can't even get started.
My every attempt to consume the web services using WSCs, DataHolders, DataSets, as well as TextArea or DataGrid components for display have given me nothing but the "Error opening URL: 'http://mywebservice/wsdl'" even though the URLs hook up fine in the Web Services panel and show details and methods in the Params tab of the Component Inspector.
And yes, I've run the FlashMX 2k4 pro updater.
I'm trying to use the Tip Of The Day (http://www.macromedia.com/devnet/mx/flash/articles/tipoday_pt2.html) web service tutorial by Jen deHaan as an example but I'm running into a few different problems.
The first problem occurs when I'm trying to recreate the simple web service connector without using the Slide Presentation mode that's used in the tute.
There's an on(load) function that only contains some formatting, yet if I remove it and put it in a keyframe (without the on(load) part) I get what has come to be my classic error message, "Error opening URL..." and then the url of the web service. Even though this is the same url that works if the formatting is left onLoad with the slide. Here's the code straight from the tute that offends somehow when used straight on a keyframe and without the clip event:onClipEvent (load) {
//_global.__dataLogger = new mx.data.binding.Log();
this.dataHolder_dh.tipdate_str = dateFormat(new Date());
function dateFormat(dDate:Date):String {
var nYear = dDate.getFullYear();
var nMonth = dDate.getMonth()+1;
var nDay = dDate.getDate();
if (nMonth<10) {
nMonth = "0"+nMonth;
}
if (nDay<10) {
nDay = "0"+nDay;
}
return new String(nMonth+"/"+nDay+"/"+nYear);
}
var flash_css = new TextField.StyleSheet();
flash_css.setStyle(".text", {fontFamily:'Arial,Helvetica,sans-serif', fontSize:'11px', color:'#000000'});
flash_css.setStyle(".title", {fontFamily:'Arial,Helvetica,sans-serif', fontSize:'16px', color:'#999999', fontWeight:'bold'});
flash_css.setStyle("a", {fontFamily:'Arial,Helvetica,sans-serif', fontSize:'11px', color:'#0000FF'});
flash_css.setStyle("a:hover", {fontFamily:'Arial,Helvetica,sans-serif', fontSize:'11px', color:'#336699'});
this.tip.TipText_txt.styleSheet = flash_css;
} The other problem I'm having is a general lack of familiarity with setting up my bindings and schema, but if I could even get one array in from this web service I'd be happy to muck around with the rest of it until it played nice just by trial and error. Unfortunately, when all I get is "Error opening URL" I can't even get started.
My every attempt to consume the web services using WSCs, DataHolders, DataSets, as well as TextArea or DataGrid components for display have given me nothing but the "Error opening URL: 'http://mywebservice/wsdl'" even though the URLs hook up fine in the Web Services panel and show details and methods in the Params tab of the Component Inspector.
And yes, I've run the FlashMX 2k4 pro updater.