Today, I tried the functionality of the WebService Connector in MX2004, which was basically smooth, and the process is recorded as follows:
Method A "Component Inspector" static configuration
Place a Webservice Connector Setting URL on the interface The WSDLFLASH of the WS is automatically retrieved. The method of the WS is automatically retrieved, selecting a method and then binds PARAM and Result to the data, which is Flash for PARAM and RESULT. Automatic completion. One point to note that in indicates that the parameters are passed to the WS, OUT indicates the result of the WS return. Then then call ws.trigger () to get the result method 2 Dynamic link through the AS statement
The first method does not have to be programmed, simple and easy to operate. However, there are many times to enter the input parameters and display results according to user needs, this is to use AS to listen to the WS component.
The first three steps and the first method then listen to the WS component "result" event var res = function (ev) {INITCIST (Ev.target.Results);}; _ root.myws.addeventListener ("result", res); Result As a string incoming function (InitCityList) XML.Prototype.IgnoreWhite = true; // First to set the XML IgnoreWhite property is Truefunction INITCITYLIST (RES: STRING) {// Note the following two sentences, to introduce The string is first assigned to a TextField, then read it out, so that it can be used normally, otherwise the failure will be resolved. This problem has not been clear why? _root.test.text = res; var tempxml: XML; Tempxml = new XML (_root.test.text); root = tempxml.firstchild; var nodeArray: array = root.childNodes; for (var i = 0; i WS_PARAM.COUNTRYNAME = Country; WS_PARAM.CITYNAME = city; Ws.Params = WS_PARAM; Ws.trigger ();