【发布时间】:2011-05-23 06:06:30
【问题描述】:
我在webroot下直接创建了一个xml文件,命名为index.jsp,内容如下:
<%@ page language="java" import="java.util.*" pageEncoding="ISO-8859-1"%>
<?xml version="1.0" encoding="utf-8"?>
<catalog>
<product>
<name>Product 1</name>
<description>Product 1 is good</description>
<price>5</price>
</product>
<product>
<name>Product 2</name>
<description>Product 2 is good</description>
<price>15</price>
</product>
<product>
<name>Product 2</name>
<description>Product 2 is good</description>
<price>25</price>
</product>
</catalog>
并且在 WEB-INF/flex 下的 proxy-config.xml 中:
<destination id="getXML">
<properties>
<url>http://localhost:8080/FlexTest/index.jsp</url>
</properties>
</destination>
在main.mxml中,httpservice如下:
<mx:HTTPService id="httpService" destination="getXML" useProxy="true" />
对应的DataGrid:
<mx:DataGrid dataProvider="{httpService.lastResult.catalog.product}" x="405" y="130" width="329" height="166"/>
但是当我点击按钮执行httpService.send()时,出现如下错误:
[RPC Fault faultString="Error sending request" faultCode="Server.Proxy.Request.Failed" faultDetail="Connection refused: connect"]
在 mx.rpc::AbstractInvoker/http://www.adobe.com/2006/flex/mx/internal::faultHandler()[C:\autobuild\3.5.0\frameworks\projects\rpc\src \mx\rpc\AbstractInvoker.as:290] 在 mx.rpc::Responder/fault()[C:\autobuild\3.5.0\frameworks\projects\rpc\src\mx\rpc\Responder.as:58] 在 mx.rpc::AsyncRequest/fault()[C:\autobuild\3.5.0\frameworks\projects\rpc\src\mx\rpc\AsyncRequest.as:103] 在 NetConnectionMessageResponder/statusHandler()[C:\autobuild\3.5.0\frameworks\projects\rpc\src\mx\messaging\channels\NetConnectionChannel.as:581] 在 mx.messaging::MessageResponder/status()[C:\autobuild\3.5.0\frameworks\projects\rpc\src\mx\messaging\MessageResponder.as:222]
希望有人能帮我解决一下,非常感谢。
【问题讨论】:
标签: apache-flex blazeds