mvn 结构下spring+axis2开发webservice服务器端、客户端
来源:互联网 发布:卸载office2016软件 编辑:程序博客网 时间:2024/05/22 08:14
最近接触一个项目需要用到mvn结构中搭建处理axis2的webservice服务。
搭建完成的目录如下:
其中web.xml中的配置如下:
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd" ><web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"><!-- 添加spring监听器 --><listener><listener-class>org.springframework.web.context.ContextLoaderListener</listener-class></listener><display-name>Archetype Created Web Application</display-name><context-param><param-name>contextConfigLocation</param-name><param-value>classpath:applicationContext.xml</param-value></context-param><servlet><servlet-name>AxisServlet</servlet-name><servlet-class>org.apache.axis2.transport.http.AxisServlet</servlet-class><load-on-startup>1</load-on-startup></servlet><servlet-mapping><servlet-name>AxisServlet</servlet-name><url-pattern>/services/*</url-pattern></servlet-mapping></web-app>
其中org.springframework.web.context.ContextLoaderListener 配置spring的监听器
<servlet-name>AxisServlet</servlet-name><servlet-class>org.apache.axis2.transport.http.AxisServlet</servlet-class><load-on-startup>1</load-on-startup></servlet>
配置的是axis的webservice提供类
在WEB-INF下新建services目录
services.xml的配置
<?xml version="1.0" encoding="UTF-8"?><serviceGroup><service name="SyncService"><description>Test WebService</description><parameter name="ServiceClass">com.moretrust.mtbp.webservice.MtbpSynWebService</parameter><parameter name="ServiceObjectSupplier">org.apache.axis2.extensions.spring.receivers.SpringServletContextObjectSupplier</parameter><parameter name="SpringBeanName">mtbpSynWebService</parameter><messageReceivers> <messageReceiver mep="http://www.w3.org/2004/08/wsdl/in-out" class="org.apache.axis2.rpc.receivers.RPCMessageReceiver"/></messageReceivers></service></serviceGroup>
spring的配置文件
<?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:context="http://www.springframework.org/schema/context"xmlns:aop="http://www.springframework.org/schema/aop"xmlns:tx="http://www.springframework.org/schema/tx"xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.0.xsd http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.0.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd"> <!-- 统一webservice入口 --> <bean id="mtbpSynWebService" class="com.moretrust.mtbp.webservice.MtbpSynWebServiceImpl"/></beans>
具体jar包见以下链接
http://download.csdn.net/detail/liuzhigang1237/4504904
- mvn 结构下spring+axis2开发webservice服务器端、客户端
- spring集成axis2-1.5.6实现webservice服务器端及客户端
- Axis2开发WebService客户端
- axis2 webservice 服务器端和客户端实现例子。
- Spring + axis2 开发 webservice
- Spring + axis2 开发 webservice
- 基于Axis2开发WebService-客户端
- webservice客户端,服务器端开发总结
- 使用 Axis2主要API开发WebService客户端
- Axis2开发WebService服务端及客户端
- axis2生成客户端代理开发webservice
- Axis2开发webservice客户端的方式
- spring webservice (一) 服务器端开发
- spring webservice (一) 服务器端开发
- axis2 客户端调用服务器端
- axis2 客户端调用服务器端
- eclipse开发webservice-axis2/spring+maven
- eclipse开发webservice-axis2/spring+maven
- const指针的了解
- ADADMIN - Generate Applications Files 菜单项详解
- UBUNTU安装PHP mysql
- SSH配置之web.xml .
- TCP/IP详解学习笔记(5)-IP选路,动态选路,和一些细节
- mvn 结构下spring+axis2开发webservice服务器端、客户端
- JNI中反向访问java对象
- Android 短信列表的时间显示
- Objective C 原型模式
- EXTJS分别用数组和JSON对象数组填充表格数据
- java DES加密解密文件
- 浅谈android的selector,背景选择器
- .net 上传图片 判断是否为真正的图片 防止木马
- LoadRunner 11 下载、安装、破解