关于spring集成cxf的问题,运行tomcat之后一直提示 No services have been found.快烦死了。 20
接口@WebServicepublicinterfaceWxBsOrgaGisAddService{publicStringaddWxBsOrgaGis(WxBsOrga...
接口
@WebService
public interface WxBsOrgaGisAddService {
public String addWxBsOrgaGis(WxBsOrgaGisEntity wxBsOrgaGisEntity);
}
实体类
@WebService(endpointInterface = "com.cfwx.rox.busin.service.yywd.webservice.WxBsOrgaGisAddService")
public class WxBsOrgaGisAddServiceImpl implements WxBsOrgaGisAddService {
@Override
public String addWxBsOrgaGis(WxBsOrgaGisEntity wxBsOrgaGisEntity) {
}}
web.xml
<servlet>
<servlet-name>CXFServlet</servlet-name>
<servlet-class>org.apache.cxf.transport.servlet.CXFServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>CXFServlet</servlet-name>
<url-pattern>/wxwebservice/*</url-pattern>
</servlet-mapping>
bean.xml
http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd" default-autowire="byName">
<import resource="classpath:META-INF/cxf/cxf.xml" />
<import resource="classpath:META-INF/cxf/cxf-extension-soap.xml" />
<import resource="classpath:META-INF/cxf/cxf-servlet.xml" />
<bean id="wxBsOrgaGisAddServiceImpl" class="com.cfwx.rox.busin.service.yywd.webservice.impl.WxBsOrgaGisAddServiceImpl"></bean>
<jaxws:endpoint id="wxBsOrgaGisAddService" implementor="#wxBsOrgaGisAddServiceImpl" address="/hello"></jaxws:endpoint>
都没有问题了,却一直出错,就是把上面的找不到service bean的错。。。各位帮忙找找 展开
@WebService
public interface WxBsOrgaGisAddService {
public String addWxBsOrgaGis(WxBsOrgaGisEntity wxBsOrgaGisEntity);
}
实体类
@WebService(endpointInterface = "com.cfwx.rox.busin.service.yywd.webservice.WxBsOrgaGisAddService")
public class WxBsOrgaGisAddServiceImpl implements WxBsOrgaGisAddService {
@Override
public String addWxBsOrgaGis(WxBsOrgaGisEntity wxBsOrgaGisEntity) {
}}
web.xml
<servlet>
<servlet-name>CXFServlet</servlet-name>
<servlet-class>org.apache.cxf.transport.servlet.CXFServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>CXFServlet</servlet-name>
<url-pattern>/wxwebservice/*</url-pattern>
</servlet-mapping>
bean.xml
http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd" default-autowire="byName">
<import resource="classpath:META-INF/cxf/cxf.xml" />
<import resource="classpath:META-INF/cxf/cxf-extension-soap.xml" />
<import resource="classpath:META-INF/cxf/cxf-servlet.xml" />
<bean id="wxBsOrgaGisAddServiceImpl" class="com.cfwx.rox.busin.service.yywd.webservice.impl.WxBsOrgaGisAddServiceImpl"></bean>
<jaxws:endpoint id="wxBsOrgaGisAddService" implementor="#wxBsOrgaGisAddServiceImpl" address="/hello"></jaxws:endpoint>
都没有问题了,却一直出错,就是把上面的找不到service bean的错。。。各位帮忙找找 展开
2个回答
展开全部
你配置 <jaxws:endpoint id="wxBsOrgaGisAddService" implementor="#wxBsOrgaGisAddServiceImpl" address="/hello"></jaxws:endpoint>
这个应该不对。
试试这个:
http://www.cnblogs.com/hoojo/archive/2011/03/30/1999563.html
我都是这样用,没有问题
<jaxws:server id="userService"serviceClass="com.skyon.cxf.IComplexUserService"address="/Users">
<jaxws:serviceBean>
<!-- 要暴露的 bean 的引用 -->
<ref bean="userServiceBean"/>
</jaxws:server>
这个应该不对。
试试这个:
http://www.cnblogs.com/hoojo/archive/2011/03/30/1999563.html
我都是这样用,没有问题
<jaxws:server id="userService"serviceClass="com.skyon.cxf.IComplexUserService"address="/Users">
<jaxws:serviceBean>
<!-- 要暴露的 bean 的引用 -->
<ref bean="userServiceBean"/>
</jaxws:server>
本回答被网友采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询