一旦我运行我的 Flex 应用程序,它就会成功获取 SOAP 响应并填充下拉框中的值,但它们是空的,换句话说,当我将鼠标悬停在我的下拉框上时,我可以看到它有三个空值。
我的弹性代码
<fx:Script>
<![CDATA[
import mx.events.FlexEvent;
protected function
dropDownList_creationCompleteHandler(event:FlexEvent):void
{
myResults.token = myservice.myUsers();
}
]]>
</fx:Script>
<fx:Declarations>
<myservice:myservice id="myservice"/>
<s:CallResponder id="myResults"/>
</fx:Declarations>
<s:FormItem label="Label">
<s:DropDownList id="dropDownList"
creationComplete="dropDownList_creationCompleteHandler(event)"
labelField="name">
<s:AsyncListView list="{myResults.lastResult}"/>
</s:DropDownList>
</s:FormItem>
XML 是
<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<myusersResponse xmlns="http://Services.com">
<myusersReturn>
<name>Nicole</name>
<age>50</age>
</myusersReturn>
<myusersReturn>
<name>Jayne</name>
<age>40</age>
</myusersReturn>
<myusersReturn>
<name>Alex</name>
<age>33</age>
</myusersReturn>
</myusersResponse>
</soapenv:Body>
</soapenv:Envelope>