//HttpServicel配置声明
<mx:HTTPService url="servlet/WebContextPathServlet"
id="service"
result="serviceResult(event)"
method="GET" contentType="application/xml"
useProxy="false">
</mx:HTTPService>
protected function application1_creationCompleteHandler(event:FlexEvent):void
{
//发送请求
service.send();
}
//回调得到返回的结果
public function serviceResult(event:ResultEvent):void{
Alert.show(event.result as String);
}