Apache flex Flex忽略services-config.xml中的更改

Apache flex Flex忽略services-config.xml中的更改,apache-flex,flex3,Apache Flex,Flex3,昨天我花了半天时间试图强迫Flex远程处理使用HTTPS,但没有成功 今天我尝试连接到其他域。 我更改了端点的url,但flex似乎忽略了我的更改。 我确信src目录中的任何文件中都不存在旧的url, 我甚至将services-config.xml重命名为services-config2.xml,多次清理和重建项目,甚至进行了发布构建,但它仍然连接到同一个域 我已经在localhost和同一个域中测试了flex应用程序,该域具有AMF服务,但其工作方式相同 我的services-config.x

昨天我花了半天时间试图强迫Flex远程处理使用HTTPS,但没有成功

今天我尝试连接到其他域。 我更改了端点的url,但flex似乎忽略了我的更改。 我确信src目录中的任何文件中都不存在旧的url, 我甚至将services-config.xml重命名为services-config2.xml,多次清理和重建项目,甚至进行了发布构建,但它仍然连接到同一个域

我已经在localhost和同一个域中测试了flex应用程序,该域具有AMF服务,但其工作方式相同

我的services-config.xml是:

<?xml version="1.0" encoding="UTF-8"?>
<services-config>
    <services>
        <service id="amfphp-flashremoting-service" class="flex.messaging.services.RemotingService" messageTypes="flex.messaging.messages.RemotingMessage">
            <destination id="amfphp">
                <channels>
                    <channel ref="my-amfphp-secure"/>
                    <channel ref="my-amfphp"/>
                </channels>
                <properties>
                    <source>*</source>
                </properties>
            </destination>
        </service>
    </services>
    <channels>
        <channel-definition id="my-amfphp-secure" class="mx.messaging.channels.SecureAMFChannel">
            <endpoint uri="https://xxx.dev.company.com:443/AMF" class="flex.messaging.endpoints.SecureAMFEndpoint"/>
            <properties>
                <polling-enabled>false</polling-enabled>
                <serialization>
                    <instantiate-types>false</instantiate-types>
                    <log-property-errors>true</log-property-errors>
                </serialization>
                <add-no-cache-headers>false</add-no-cache-headers>
            </properties>
        </channel-definition>
        <channel-definition id="my-amfphp" class="mx.messaging.channels.AMFChannel" >
            <endpoint uri="http://xxx.dev.company.com/AMF" class="flex.messaging.endpoints.AMFEndpoint" />
            <properties>
                <polling-enabled>false</polling-enabled>
                <serialization>
                    <instantiate-types>false</instantiate-types>
                    <log-property-errors>true</log-property-errors>
                </serialization>
                <add-no-cache-headers>false</add-no-cache-headers>
            </properties>
        </channel-definition>
    </channels>
</services-config>

*
假的
假的
真的
假的
假的
假的
真的
假的
mxml中的RemoteObject定义:

<mx:RemoteObject id="Agentrpc" destination="amfphp" source="Agentrpc" showBusyCursor="true">
    <mx:method name="getAgentID" result="getAgentID_resultHandler(event)" fault="faultHandler(event)"/>
</mx:RemoteObject>

我正在使用Flex3

编辑:我查看了generated/dir,发现FlexInit文件(如MainModule_FlexInit-generated.as)包含以下代码:

ServerConfig.xml =
<services>
    <service id="amfphp-flashremoting-service">
        <destination id="amfphp">
            <channels>
                <channel ref="my-amfphp-secure"/>
                <channel ref="my-amfphp"/>
            </channels>
        </destination>
    </service>
    <channels>
        <channel id="my-amfphp-secure" type="mx.messaging.channels.SecureAMFChannel">
            <endpoint uri="https://gintautas.dev.company.com:443/AMF"/>
            <properties>
                <polling-enabled>false</polling-enabled>
            </properties>
        </channel>
        <channel id="my-amfphp" type="mx.messaging.channels.AMFChannel">
            <endpoint uri="http://gintautas.dev.company.com/AMF"/>
            <properties>
                <polling-enabled>false</polling-enabled>
            </properties>
        </channel>
    </channels>
</services>;
ServerConfig.xml=
假的
假的
;
这是正确的,但应用程序不会向gintautas.dev.company.com发出请求


编辑2:我安装了Flash Builder 4,并尝试使用3.5和4.0(在兼容模式下)编译器进行编译,但两者都有相同的问题:(

您可以尝试清除浏览器缓存吗?services.xml的内容在编译时被注入SWF。

您可以使用以下内容检查从*-config.xml文件编译到flex中的内容:

trace( ServerConfig.XML );

另外,如果将WTP与tomcat一起使用,请检查服务器是否正在使用tomcat的实际安装,或者运行临时eclipse文件夹。这有时可能会导致混淆。

您必须“清理项目”在Flex Builder中,当您更改服务配置.xml时,Allready尝试了这个方法。Firefox中的Web Developer插件完全禁用了缓存,每次/突然它开始工作时,所有文件都会被下载,可能是因为我复制了一个项目并更改了工作区。真不敢相信缓存问题又来了!感谢您提到这一点可能有帮助,也可能没有帮助(因为我们尽可能避免服务配置,并尽可能以编程方式进行),但我知道我几年前遇到的问题与AMFChannel类和SecureAMFChannel类有关。我不确定解析服务配置xml文件时,remoteObject的通道集是如何初始化的,但我知道,当这些事情以编程方式完成时,我感觉我有了更多的控制权。David,谢谢对于这一点,与原始帖子有类似的问题——能够看到表面上编译的内容是一件非常好的事情