Hi,
I am returning a .NET dataset to Flex Actionscript via a web service. Actionscript snippet as follows:
var websvc:WebService = new WebService();
websvc.useProxy=false;
websvc.wsdl = "http://localhost:13229/test/mysvc.asmx?WSDL";
websvc.loadWSDL();
var operation:Operation = new Operation(null, "GetData");
operation.arguments.command="xx_gethierdata_"+mode+"_"+identifier;
operation.addEventListener(ResultEvent.RESULT, onResultHandler, false, 0, true);
operation.addEventListener(FaultEvent.FAULT, onFaultHandler, false, 0, true);
operation.resultFormat="object";
websvc.operations = [operation];
operation.send();
Once in the onResultHandler function I have access to the datatable - I then want to grab the column names. The following code outputs my column names:
for each (var tcolumn:Object in datatable.Columns){trace('Column:'+tcolumn);}
This works ok, but the column names are encoded, so a column name that is actually "1-9" is output as "_x005B_1-9_x005D_"
Anyone know the best way to decode the column name? I could replace all the encoding strings, but surely there is a better way?
Thanks