将URL作为参数传递

时间:2009-06-03 12:25:53

标签: flex

 <mx:HTTPService id="addWeb" resultFormat="object" result="Added(event)" fault="faultWeb(event)" showBusyCursor="true" method="GET" url="http://localhost/search/populate.php" useProxy="false">
        <mx:request xmlns="">
            <urlWeb>{urlW.text}</urlWeb>
        </mx:request>
    </mx:HTTPService>

 <mx:Text id="query" x="10" y="425" text="Text" width="486" visible="false" height="30" fontWeight="bold" fontSize="16"/>
            <mx:Button x="772" y="424" label="Add" click="addWeb.send();"/>
            <mx:TextInput id="urlW" x="604" y="424" />
            <mx:Label x="513" y="426" text="Add website" />

我传递了一些随机的url作为参数,但是我遇到了这种错误。

[RPC Fault faultString="Error #1096" faultCode="Client.CouldNotDecode" faultDetail="null"]

1 个答案:

答案 0 :(得分:0)

<urlWeb>{urlW.text}</urlWeb>

当Flex分析请求节点时,这是无效的。您需要使用数组,对象,字符串,数字或xml

<mx:String>{urlW.text}</mx:String>