`

flex blazed 配置多个remoting-config

    博客分类:
  • FLEX
阅读更多

我把配置贴出来,大家如果有类似需求可以参考下:

remoting-config-1.xml配置
<?xml version="1.0" encoding="UTF-8"?>
<service id="remoting-service-1"
    class="flex.messaging.services.RemotingService">

    <adapters>
        <adapter-definition id="java-object"
            class="flex.messaging.services.remoting.adapters.JavaAdapter"
            default="true" />
    </adapters>
   
    <default-channels>
        <channel ref="my-amf" />
    </default-channels>

    <destination id="userService">
        <properties>
            <source>com.qihu.service.UserService</source>
        </properties>
    </destination>
</service>

remoting-config-2.xml配置

<?xml version="1.0" encoding="UTF-8"?>
<service id="remoting-service-2"
    class="flex.messaging.services.RemotingService">

    <adapters>
        <adapter-definition id="java-object"
            class="flex.messaging.services.remoting.adapters.JavaAdapter"
            default="true" />
    </adapters>

    <default-channels>
        <channel ref="my-amf" />
    </default-channels>

    <destination id="customService">
        <properties>
            <source>com.qihu.service.CustomService</source>
        </properties>
    </destination>
</service>

services-config.xml配置:

<?xml version="1.0" encoding="UTF-8"?>
<services-config>

   <services>
       <service-include file-path="remoting-config-1.xml" />
       <service-include file-path="remoting-config-2.xml" />
       <service-include file-path="proxy-config.xml" />
       <service-include file-path="messaging-config.xml" />       
   </services>

应用程序:

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
<mx:RemoteObject id="user" destination="userService"/>
<mx:RemoteObject id="custom" destination="customService"/>
    <mx:Label x="280" y="325" width="160" text="{user.testByUser.lastResult}"/>
    <mx:TextInput id="userInput" x="280" y="295" change="user.testByUser(userInput.text)"/>
    <mx:Label x="480" y="325" width="160" text="{custom.testByCustom.lastResult}"/>
    <mx:TextInput id="customInput" x="480" y="295" change="custom.testByCustom(customInput.text)"/>
</mx:Application>
分享到:
评论
1 楼 zpz112358 2013-01-02  
具体是什么意思啊?

相关推荐

    spring与flex blazed整合(一般方式或注解)

    你可以使用 `&lt;flex:remoting-destination&gt;` 标签来配置服务的暴露,如下面的例子所示: ```xml &lt;flex:remoting-destination ref="userService" endpoint="httpEndpoint" /&gt; ``` 4. **配置 BlazeDS**:在 `...

    ssh+flex+blazed

    在这个"ssh+flex+blazed"的集成过程中,我们主要涉及到以下几个关键知识点: 1. **SSH框架**: - **Spring**:提供依赖注入(DI)和面向切面编程(AOP),用于管理应用程序的组件和处理事务。 - **Struts**:是一...

    java+flex+blazeds+sqlserverk开发文档.docx

    - 使用`WEB-INF`文件夹中的配置文件,如`remoting-config.xml`。 - 将`WEB-INF`文件夹复制到Java项目的`WebRoot`目录下,替换原有的`WEB-INF`文件夹。 2. **创建Java类**: - 在Java项目中创建一个类,例如`...

    构建全栈式Flex、BlazeDS和Spring集成解决方案

    3. **配置BlazeDS**:在Java项目中集成BlazeDS,配置相应的web.xml文件以启用BlazeDS服务,并在Flex项目中配置services-config.xml来指定与后端服务的连接。 4. **创建Spring服务**:使用Spring的注解或XML配置方式...

    Flex与java后台交互环境搭建

    此外,编辑`remoting-config.xml`文件,定义目的地(destination),指明Java服务的源路径,例如`com.java.flex.FirstJavaFlex`。 #### 测试通信 为了验证Flex与Java的通信是否成功建立,可以编写一个简单的示例。...

Global site tag (gtag.js) - Google Analytics