Hi, folks!
I have a question.
When I use the WebService object to connect a WSDL, i have a “result” wich is the array of objects generated througth the WebService service.
Ok. I take it, call a Class and use the result array to pass values and properties for my new objects.
But, and when I use XMLConnector? It recognizes the schemma, show me the type of the nodes (if objject or array) etc. But I can not go into this and pick up the objects? Neither the “result array”?
Because I don´t want to put the nodeValues into a combobox or a list component. I want take the values and use it into my action script files.
This is my code to my Webservice (that works wonderfull) :
//-------<Iniciando servico WebService para Lista de Aparelhos>-----------------\
import mx.services.WebService;
var aparelhosWebService:WebService = new WebService(“http://javadev01:7001/web-services/Aparelhos?WSDL”);
var listaDeAparelhos:Object = aparelhosWebService.getDestaque(regional);
var galeriaAparelhos:GaleriaAparelhosDestaque = new GaleriaAparelhosDestaque();
var arrayAparelhos:Array = new Array();
//
[COLOR=Red]listaDeAparelhos.onResult[/COLOR] = function([COLOR=Red]wsdlResults:Array[/COLOR]):Void {
[COLOR=Red] galeriaAparelhos.dataProvider = wsdlResults;[/COLOR]
arrayAparelhos = galeriaAparelhos.getArrayAparelhos();
_root.montarGaleria();
};
aparelhosWebService.onFault = function(error:Object) {
getURL(“javascript:alert(‘Não foi possível localizar o WSDL’);”);
trace(“error:”);
for (var prop in error) {
trace(" " + prop + " -> " + error[prop]);
//getURL(“javascript.window.alert(‘erro: “+prop+” "+"prop: “+error[prop]+”’);”);
}
};
function traceResultados():Void {
for (var i:Number = 0; i < galeriaAparelhos.getArrayAparelhos().length; i++) {
//trace(“aparelho: " + arrayAparelhos*.getNome());
//trace(“foto2: " + arrayAparelhos*.getFoto2());
//trace(”-------------------”);
}
}
//-------</Iniciando servico WebService para Lista de Aparelhos>-----------------\
I tried to use the DataSet component to binding the data but I could not get any kind of result fromm this.
I hope I can use this components and extract the data that they recognize. I can not support the $%$!@#$%@# loopings like
root.firstChild.childNodes[0].childNodes[0].childNodes[0].childNodes[0].childNodes[0].childNodes[0].childNodes[0].childNodes[0].childNodes[0]. infinitChildNodes…
Thanks a lot!
PS: above two images fromm my component inspector tab. WebService and XMLConnector recognize correctly the methods that I need to extract.
Any Idea?