XFire 下载地址:http://xfire.codehaus.org/Download
lib目录需要下列文件:
activation-1.1.jar
commons-beanutils-1.7.0.jar
commons-codec-1.3.jar
commons-httpclient-3.0.jar
commons-logging-1.0.4.jar
jaxws-api-2.0.jar
jdom-1.0.jar
jsr173_api-1.0.jar
log4j-1.2.11.jar
mail-1.4.jar
saaj-api-1.3.jar
saaj-impl-1.3.jar
spring.jar
stax-api-1.0.1.jar
uuid-2.1.5.jar
wsdl4j-1.6.1.jar
wstx-asl-3.2.0.jar
xbean-2.2.0.jar
xbean-spring-2.8.jar
xfire-all-1.2.6.jar
XmlSchema-1.1.jar
web.xml文件:
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.4"
xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>/WEB-INF/applicationContext.xml, /WEB-INF/xfire-servlet.xml</param-value>
</context-param>
<context-param>
<param-name>log4jConfigLocation</param-name>
<param-value>/WEB-INF/classes/log4j.properties</param-value>
</context-param>
<listener>
<listener-class>org.springframework.web.util.Log4jConfigListener</listener-class>
</listener>
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
<servlet>
<servlet-name>xfire</servlet-name>
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>xfire</servlet-name>
<url-pattern>/*</url-pattern>
</servlet-mapping>
<servlet>
<servlet-name>xfireServlet</servlet-name>
<servlet-class>org.codehaus.xfire.spring.XFireSpringServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>xfireServlet</servlet-name>
<url-pattern>/service/*</url-pattern>
</servlet-mapping>
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
</web-app>
applicationContext.xml文件
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
<beans>
<bean id="echoBean" class="com.hyw.example.EchoImpl"/>
<bean id="userBean" class="com.hyw.example.UserServiceImpl"/>
</beans>
xfire-servlet.xml文件
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
<beans>
<import resource="classpath:org/codehaus/xfire/spring/xfire.xml" />
<bean class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping">
<property name="urlMap">
<map>
<entry key="/EchoService">
<ref bean="echoService"/>
</entry>
<entry key="/UserService">
<ref bean="userService"/>
</entry>
</map>
</property>
</bean>
<bean id="baseWebService" class="org.codehaus.xfire.spring.remoting.XFireExporter" lazy-init="false" abstract="true">
<property name="serviceFactory">
<ref bean="xfire.serviceFactory"/>
</property>
<property name="xfire">
<ref bean="xfire"/>
</property>
</bean>
<bean id="echoService" parent="baseWebService">
<property name="serviceBean">
<ref bean="echoBean"/>
</property>
<property name="serviceClass">
<value>com.hyw.example.Echo</value>
</property>
</bean>
<bean id="userService" parent="baseWebService">
<property name="serviceBean">
<ref bean="userBean"/>
</property>
<property name="serviceClass">
<value>com.hyw.example.UserService</value>
</property>
</bean>
</beans>
log4j.properties文件
log4j.rootLogger=INFO, stdout
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern=%d %p [%c] - %m%n
分享到:
相关推荐
spring+xfire( 编写webservice完整配置+案例)
spring+xfire集成解决方案spring+xfire集成解决方案
使用XFire+Spring构建Web Service使用XFire+Spring构建Web Service使用XFire+Spring构建Web Service使用XFire+Spring构建Web Service使用XFire+Spring构建Web Service使用XFire+Spring构建Web Service
xfire+spring+安全认证,包含服务端和客户端,xfire jar包可以从我的资源下面下或网上很多。
Spring+xFire+wss4j配置Helloworld完整Demo.rar
spring +xfire整合 1. xfire + spring 发布webservice 2. 利用 javascript 调用发布的webservice
XFire中实现WS-Security完整编 Spring+xFire+wss4j配置Helloworld实例 完整说明文档 Myeclipse项目 服务端工程 客户端工程
Spring+xFire实现webService
Spring+xfire实现WebService
实现 xFire与 Spring 的集成
使用XFire+Spring使用XFire+Spring构建Web Service(二).doc构建使用XFire+Spring构建Web Service(二).docWeb Service(二).doc
网上资料大多是只有spring+xfire 含有Hibernate的少 3.配置时候还遇到spring实现 客户端调用服务器端时候 注入失败 4.在服务器端向客户端做映射的时候失败 5.在服务器端获取非基本类转化问题
李君老师JavaEE笔记-Spring+XFire
Spring+Hibernate+Xfire+发布WebService教程文档
webservice+spring+xfire完整项目(包含jar包),只要导入myeclipse就可以直接使用,已经导入所需的所有jar包了
使用XFire+Spring构建Web Service步骤以及源代码.rar
使用XFire+Spring构建Web Service步骤 java