论坛首页 Java版 SOA

关于 CXF 继承Spring/Hibernate 问题

浏览 2778 次
精华帖 (0) :: 良好帖 (0) :: 新手帖 (0) :: 隐藏帖 (0)
作者 正文
最后更新时间:2007-09-19
在部署时,指定<jaxws:endpoint 的implementor属性是需要实现类,我的这个实现类构造函数需要spring提供一个dao注入,请教如何实现?
官方文档只介绍了写出实现类的 全包路径+实现类名,如何提供构造注入?

因为我现在一启动服务,就会提示 这个实现类加载错误。
   
最后更新时间:2007-09-20
CXF jaxws:endpoint@implement 支持传递一个Spring bean 的引用。
具体可以参考下面的例子

<bean id="greeter" class="org.apache.hello_world_soap_http.GreeterImpl"/>

  <jaxws:endpoint id="simpleWithAddress"
    implementor="#greeter" address="http://localhost:8080/simpleWithAddress"/>

BTW
建议你参加到CXF中文论坛 cxf_zh 的讨论,这样你可以获得更多有关CXF的使用信息。
http://groups.google.com/group/cxf-zh
   
0 请登录后投票
最后更新时间:2007-09-20

CXF jaxws:endpoint@implementor 支持指定一个spring bean 的引用
下面是具体的例子

xml 代码
  1. <bean id="greeter" class="org.apache.hello_world_soap_http.GreeterImpl"/>  
  2.   
  3.   <jaxws:endpoint id="simpleWithAddress"    
  4.     implementor="#greeter" address="http://localhost:8080/simpleWithAddress"/>  

还有建议你参加到CXF的中文讨论组来,这边有很多CXF的开发者以及使用者,你的问题会在第一时间内获得解答的。

http://groups.google.com/group/cxf-zh

   
0 请登录后投票
最后更新时间:2007-09-30
写成#xxx不直观,可以

    <jaxws:endpoint id="jws_AccountService" address="/AccountService">
        <jaxws:implementor>
            <ref bean="accountService" />
        </jaxws:implementor>
    </jaxws:endpoint>
   
0 请登录后投票
论坛首页 Java版 SOA

跳转论坛:
JavaEye推荐