WebService注入为空的问题

要把项目里的业务层,用 WebService 有选择的发布出来.

碰到调用 WebService 发布的服务时,业务层中 Spring 注入的 Bean 都为空的情况.

问题分析, 业务层 Bean 使用的 Spring 容器和调用 WebService 服务中使用的不是同一个 Spring 容器. 

所以,在 WebService 中获得不到已经注入的业务 Bean

解决办法:

        implementorClass="cn.jbit.cxf.service.impl.ApplicationServiceImpl" 

                  address="/applicationService" >
     ref="appli"/>

 

一般的是

  implementor="cn.jbit.cxf.service.impl.ApplicationServiceImpl" address="/applicationService" />

你可能感兴趣的:(SOA)