加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > 安全 > 正文

XFire与SSH集成

发布时间:2020-12-17 01:18:01 所属栏目:安全 来源:网络整理
导读:1.XFIRE中有spring的1.2.6的jar包会与你集成的spring2中的jar包冲突,所以要删除xfire中的spring1.2.6的jar包,解决冲突报错的问题。 2.与spring集成之后WEBSERVICE将由spring去处理所以配置webservice之前要在web.xml中配如下信息 ?context-param ??????? p

1.XFIRE中有spring的1.2.6的jar包会与你集成的spring2中的jar包冲突,所以要删除xfire中的spring1.2.6的jar包,解决冲突报错的问题。

2.与spring集成之后WEBSERVICE将由spring去处理所以配置webservice之前要在web.xml中配如下信息

?<context-param>
??????? <param-name>contextConfigLocation</param-name>
??????? <param-value>classpath:org/codehaus/xfire/spring/xfire.xml,classpath:applicationContext-webService.xml</param-value>
??? </context-param>

??? <listener>
??? ?<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
??? </listener>

既然要交给spring去处理了所以web.xml中配置的xfire所用到的包也要替换成spring中的包,如下配置:

<servlet>
??? <servlet-name>XFireServlet</servlet-name>
??? <servlet-class>org.codehaus.xfire.spring.XFireSpringServlet</servlet-class>
??? <load-on-startup>0</load-on-startup>
? </servlet>

<servlet-mapping>
??? <servlet-name>XFireServlet</servlet-name>
??? <url-pattern>/services/*</url-pattern>
?</servlet-mapping>

3.在spring中配置WebService

<bean id="wsimpl" class="com.tcwebservice.test.Wsimpl"></bean>?<bean name="sh" class="org.codehaus.xfire.spring.ServiceBean"> //访问webservice的名称??<property name="serviceBean" ref="wsimpl"></property> //发布的WEBSERVICE的实现类??<property name="serviceClass" value="com.tcwebservice.test.Wstest"></property> //对应实现类的接口?</bean>

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读