首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Weblogic10,BlazeDS,FlashBuilder4,错误设置远程服务绑定

Weblogic10,BlazeDS,FlashBuilder4,错误设置远程服务绑定
EN

Stack Overflow用户
提问于 2011-01-28 22:36:40
回答 1查看 673关注 0票数 0

我真的不知道还能尝试什么,任何帮助都会很感激。谢谢

1)我使用的是weblogic 10,flashbuilder4 eclipse插件,所有的东西都是用windows运行的。

2)我在weblogic 10上部署了blazeds tomcat示例,并且能够成功地将其远程服务绑定到fb4中的一个新项目fb4中,一切正常。

3)然后我修改了示例以使用我自己的java类。在fb4中的数据提供程序绑定的最后一步,当我选择目的地并单击finish按钮时,它会说:

"com.hello.test.ProductSearch在指定位置不可用。请取消选择基座产品搜索,尝试导入“

我验证了类文件在weblogic上的正确部署,并且http://localhost:7001/hello/messagebroker/amf没有显示错误。

同样,当我将相同的文件位置部署到tomcat时,它也可以正常工作。因此,总结如下: 1) BlazeDS样本在weblogic10和tomcat中都能很好地工作;2)我的com.hello.test.ProductSearch在tomcat中工作得很好,但在weblogic10中给出了上述误差。

所以看起来问题是weblogic 10部署,我只是使用默认的标准weblogic10部署。不知道问题出在哪里,已经干了好几天了。

remoting-config.xml

代码语言:javascript
复制
<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="productsearch">
    <properties>
        <source>com.hello.test.ProductSearch</source>
    </properties>
</destination>

services-config.xml

代码语言:javascript
复制
<services>
    <service-include file-path="remoting-config.xml" />

    <default-channels>

       <channel ref="my-amf"/>

    </default-channels>

</services>





<channels>



    <channel-definition id="my-amf" class="mx.messaging.channels.AMFChannel">

        <endpoint url="http://{server.name}:{server.port}/{context.root}/messagebroker/amf" class="flex.messaging.endpoints.AMFEndpoint"/>

        <properties>
            <polling-enabled>false</polling-enabled>
        </properties>
    </channel-definition>

</channels>



<logging>
    <!-- You may also use flex.messaging.log.ServletLogTarget -->
    <target class="flex.messaging.log.ConsoleTarget" level="Error">
        <properties>
            <prefix>[BlazeDS] </prefix>
            <includeDate>false</includeDate>
            <includeTime>false</includeTime>
            <includeLevel>true</includeLevel>
            <includeCategory>false</includeCategory>
        </properties>
        <filters>
            <pattern>Endpoint.*</pattern>
            <pattern>Service.*</pattern>
            <pattern>Configuration</pattern>
        </filters>
    </target>
</logging>



<system>
    <redeploy>
        <enabled>true</enabled>
        <watch-interval>20</watch-interval>
        <watch-file>{context.root}/WEB-INF/flex/services-config.xml</watch-fi le>
        <watch-file>{context.root}/WEB-INF/flex/remoting-config.xml</watch-fi le>
        <touch-file>{context.root}/WEB-INF/web.xml</touch-file>
    </redeploy>
</system>

ProductSearch.java

代码语言:javascript
复制
package com.hello.test;
import java.util.ArrayList;
import java.util.List;



public class ProductSearch
{
     public AttributeVO[] search()
     {
         List<AttributeVO> retList = new ArrayList<AttributeVO>();

         retList.add(new AttributeVO("one","two", "three","four"));
         retList.add(new AttributeVO("five","six", "seven","eight"));

        return retList.toArray(new AttributeVO[retList.size()]);



     }
}

AttributeVO.java

代码语言:javascript
复制
package com.hello.test;



import java.io.Serializable;



public class AttributeVO implements Serializable
{



    static final long serialVersionUID = 1L;



    private String val1;
    private String val2;
    private String val3;
    private String val4;

    public AttributeVO()
    {}

    etc... all get getter/setters

}
EN

回答 1

Stack Overflow用户

发布于 2011-01-31 16:50:25

解决了。我使用JDK1.6编译了服务器端的java,显然最新版本的blazeDS与1.6不兼容(当然,它并不只是告诉您,这太容易了)。

一旦我使用JDK1.5重新编译,一切就都正常了。

说到挫折..。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/4833723

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档