【发布时间】:2012-06-17 19:40:02
【问题描述】:
我有一个工作的 Flex/BlazeDS 应用程序(用于简单的 AMF 远程处理),具有以下设置:
服务器配置.xml:
<channel-definition id="my-secure-amf" class="mx.messaging.channels.SecureAMFChannel">
<endpoint url="https://www.mydomain.com:443/myapp/messagebroker/amfsecure.amf"
class="flex.messaging.endpoints.AMFEndpoint"/>
<properties>
<add-no-cache-headers>false</add-no-cache-headers>
<polling-enabled>false</polling-enabled>
</properties>
</channel-definition>
在 Flash Builder 4.6 > 属性 > Flex 服务器中:
Root URL: http://www.mydomain.com/myapp
Context Root: /myapp/
问题是我所有的 java 文件都放在一个目录中:
WEB-INF/classes/
并简单地使用系统默认包(例如,在 java 文件中没有指定包)。最终,文件的绝对数量变得不堪重负。为了改善我的组织,我开始使用包,并在此过程中创建了以下目录:
WEB-INF/classes/com/mydomain/
WEB-INF/classes/com/mydomain/mytools/
WEB-INF/classes/com/mydomain/hr/
WEB-INF/classes/com/mydomain/utilities/
etc...
现在WEB-INF/classes/ 目录中没有 java 文件(它们已被移动到它的各个子目录中)。
我的问题是如何修改services-config.xml 文件和/或 Flash Builder > 属性 > Flex 服务器设置?我尝试了许多不同的设置,但总是收到以下错误:
Channel.Connect.Failed error NetConnection.Call.Failed: HTTP: Status 404: url:...
我的想法是大多数人使用WEB-INF/classes/com/mydomain/ 架构来组织他们的项目,所以我希望有人可以与我分享他们的设置是什么样的。
Adobe 的网站提供了以下信息,但我看不出我做错了什么:The root folder specifies the top-level directory of the web application (the directory that contains the WEB-INF directory). The root URL specifies the URL of the web application, and the context root specifies the root of the web application.
提前感谢任何 cmets/提示尝试什么。
更新1:
这是我的目的地(来自 remoting-config.xml):
<destination id="mySecureDestination">
<channels>
<channel ref="my-secure-amf"/>
</channels>
<properties>
<source>myApplicationClass</source>
<scope>application</scope>
</properties>
</destination>
【问题讨论】:
-
您能告诉我们您的目的地的定义吗?
标签: actionscript-3 apache-flex blazeds