Flex与服务器进行通信大全之HTTPService 方式 二

上一篇 / 下一篇  2009-04-11 16:04:14 / 个人分类:Flex

<?xml version="1.0" encoding="utf-8"?>

<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"

layout="absolute" initialize="initializeHandler(event)">

    <mx:Script>

        <![CDATA[

            private function initializeHandler(event:Event):void {

                statesService.getCountries.send( );

            }

            private function changeHandler(event:Event):void {

                statesService.getStates.send( );

            }

        ]]>

    </mx:Script>

    <mx:WebService id="statesService"

wsdl="http://www.rightactionscript.com/states/webservice/StatesServic

e.php?wsdl">

        <mx:operation name="getCountries" />

        <mx:operation name="getStates">

            <mx:request>

                <country>{country.value}</country>

            </mx:request>

        </mx:operation>

    </mx:WebService>

    <mx:VBox>

    <mx:ComboBox id="country"

         dataProvider="{statesService.getCountries.lastResult}"

change="changeHandler(event)" />

    <mx:ComboBox dataProvider="{statesService.getStates.lastResult}"

/>

    </mx:VBox>

</mx:Application>


TAG:

引用 删除 Guest   /   2009-06-18 10:26:28
-5
 

评分:0

我来说两句

显示全部

:loveliness: :handshake :victory: :funk: :time: :kiss: :call: :hug: :lol :'( :Q :L ;P :$ :P :o :@ :D :( :)

关于作者