[阅读: 415] 2006-12-29 09:18:14
Flex:
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
<mx:Script>
<![CDATA[
public function initApp():void
{
// says hello at the start, and asks for the user's name
dv.label=MyWebService.HelloWorld.send();
}
]]>
</mx:Script>
<mx:Button label="Button" width="277" id="dv" labelPlacement="top" enabled="true" click="initApp()" x="100" y="136"/>
<mx:WebService id="MyWebService" wsdl="http://localhost:10333/FlexFor51/WebService.asmx?WSDL" useProxy="false">
<mx:operation name="HelloWorld">
<mx:request>
</mx:request>
</mx:operation>
</mx:WebService>
</mx:Application>
WebService上的HelloWorld 返回个String