xfire建立webservice服务
来源:互联网 发布:广通网络 编辑:程序博客网 时间:2024/05/22 02:28
xfire建立webservice服务
spring和xfire所需的jar包自己寻找下载,我这里用的是xfire1.2.6,spring好像是2.5的
配置xfire和spring集成,需要一个xfire-servlet.xml文件,其实就是spring的.xml文件,命名空间和方式与spring一致
xfire-servlet.xml源码如下:
<?xml version="1.0" encoding="UTF-8"?><beans xmlns="http://www.springframework.org/schema/beans"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xmlns:tx="http://www.springframework.org/schema/tx"xmlns:aop="http://www.springframework.org/schema/aop"xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsdhttp://www.springframework.org/schema/txhttp://www.springframework.org/schema/tx/spring-tx-2.0.xsdhttp://www.springframework.org/schema/aophttp://www.springframework.org/schema/aop/spring-aop-2.0.xsd"><!--xfire必须的配置,不知道是什么意思--><import resource="classpath:org/codehaus/xfire/spring/xfire.xml" />
</pre><pre name="code" class="html"><span style="white-space:pre"></span><!-- 服务所需的类,交由spring管理 根据自己的情况进行设置就可以了,我这里直接粘贴我的代码了 开始 --> <bean id="jdbcmsg" class="org.springframework.jdbc.core.JdbcTemplate"> <property name="dataSource" ref="msg"></property></bean> <bean id="androdao" class="webservice.dao.AndroDao" scope="prototype"><property name="jdbc" ref="jdbccons"></property> <property name="jdbcmsg" ref="jdbcmsg"></property> </bean><bean id="synem" class="webservice.impl.EmployeeImpl" scope="prototype"><property name="xmlpar" ref="xmlparse"></property><property name="dao" ref="androdao"></property></bean>
<!-- 服务所需的类,交由spring管理 结束 -->
</pre><span style="white-space:pre"></span><pre name="code" class="html"><!-- xfire服务暴露的配置 --><beanclass="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping"><property name="urlMap"><map>
<!-- 服务 --><entry key="/SynWebService"><ref bean="synser" /></entry></map></property></bean>
<!-- 服务配置 --><bean id="synser"class="org.codehaus.xfire.spring.remoting.XFireExporter"><property name="serviceFactory"><ref bean="xfire.serviceFactory" /></property> <property name="xfire"><ref bean="xfire" /></property><property name="serviceBean"><ref bean="synem" /></property><property name="serviceClass"><value>webservice.Iemployee</value></property>
<!-- 服务名 --><property name="name" value="OA_TYYHZX_MMTB_SERVICE"></property>
<!-- 身份验证,下一贴有具体内容 --><property name="inHandlers" ref="auth"/></bean> <bean id="auth" class="webservice.XfireHandler" scope="prototype"></bean></beans>
这样xfire就配置好了
只需完善服务接口和实现类了,这里由于项目原因保密,你可以通过一个helloworld的简单类去建立接口和实现类进行测试
0 0
- xfire建立webservice服务
- 使用xfire建立webservice
- XFire WebService 服务
- IDEA中用xfire建立webservice
- 使用xfire搭建webService服务
- Java WebService 之XFire建立服务器端
- Spring中整合Xfire发布webservice服务
- xfire webservice
- Xfire WebService
- webservice----xfire
- webservice(XFire)
- xfire webservice
- 使用XFire开发webservice服务和客户端全攻略
- 使用XFire开发webservice服务和客户端全攻略
- 用Xfire将grails的服务展现为WebService
- webservice-XFire开发一个简单的web服务
- XFire开发webservice服务和客户端全攻略
- 使用XFire开发webservice服务和客户端全攻略
- 建筑工程技术
- linux时间方面的设置
- 关于<c:if>没有<c:else>解决方案
- Ubuntu下安装Nginx、Php-fpm、Php
- obs服务器搭建
- xfire建立webservice服务
- 黑马程序员_如何在Linux下装入网站(随堂笔记)
- 深搜笔记
- Quartz的任务的临时启动和暂停和恢复
- 这几天行程安排
- 01背包
- 8v344 c0g7443
- Android中获取有线网络的IP地址
- Nginx之http_image_filter_module模块使用