Axis2 1.7.4构建项目
项目 构建 1.7 Axis2
2023-09-11 14:19:23 时间
1.下载axis2项目文件
http://axis.apache.org/axis2/java/core/download.html
2.Maven文件的pom.xml文件
3.将下载的axis2-1.7.4-war.zip下的axis2.war目录中WEB-INF文件夹里的
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:web="http://java.sun.com/xml/ns/javaee" xmlns="http://java.sun.com/xml/ns/javaee" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" version="2.5">
<display-name>Archetype Created Web Application</display-name>
<servlet>
<servlet-name>AxisServlet</servlet-name>
<servlet-class>org.apache.axis2.transport.http.AxisServlet</servlet-class>
<init-param>
<param-name>contextConfigLocation</param-name>
<param-value>classpath:conf/axis2.xml</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>AxisServlet</servlet-name>
<url-pattern>url-pattern>
</servlet-mapping>
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>classpath:spring-context*.xml</param-value>
</context-param>
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
<listener>
<listener-class>org.springframework.web.util.IntrospectorCleanupListener</listener-class>
</listener>
<listener>
<listener-class>org.springframework.web.context.request.RequestContextListener</listener-class>
</listener>
<filter>
<filter-name>charEncodingFilter</filter-name>
<filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class>
<init-param>
<param-name>encoding</param-name>
<param-value>UTF-8</param-value>
</init-param>
<init-param>
<param-name>forceEncoding</param-name>
<param-value>true</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>charEncodingFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
</web-app>
5.spring-context.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:jee="http://www.springframework.org/schema/jee"
xmlns:tx="http://www.springframework.org/schema/tx" xmlns:context="http://www.springframework.org/schema/context"
xmlns:aop="http://www.springframework.org/schema/aop"
xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-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/jee
http://www.springframework.org/schema/jee/spring-jee-3.0.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-3.0.xsd
http://www.springframework.org/schema/aop
http://www.springframework.org/schema/aop/spring-aop-3.0.xsd">
<context:annotation-config/>
<context:component-scan base-package="包名">
<context:exclude-filter type="annotation" expression="org.springframework.stereotype.Controller"/>
</context:component-scan>
<bean id="propertyConfigurer"
class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<property name="locations">
<list>
<value>classpath:controller.properties</value>
</list>
</property>
</bean>
</beans>
6.创建java的接口和实现。
public interface HelloService {
public String say(String text);
}
7.创建services.xml文件
8.services.xml内容
<?xml version="1.0" encoding="UTF-8"?>
<service name="HelloService" targetNamespace="http://tempuri.org/">
<description>web service</description>
<schema schemaNamespace="http://tempuri.org/"/>
<parameter name="ServiceObjectSupplier">
org.apache.axis2.extensions.spring.receivers.SpringServletContextObjectSupplier
</parameter>
<parameter name="helloService</parameter>
<messageReceivers>
<messageReceiver mep="http://www.w3.org/ns/wsdl/in-only"
class="org.apache.axis2.rpc.receivers.RPCInOnlyMessageReceiver" />
<messageReceiver mep="http://www.w3.org/ns/wsdl/in-out"
class="org.apache.axis2.rpc.receivers.RPCMessageReceiver" />
</messageReceivers>
</service>
9.访问路径 http://localhost:8080/test/services/HelloService?wsdl
相关文章
- 从构建分布式秒杀系统聊聊验证码 给大家推荐8个SpringBoot精选项目
- express+gulp构建项目(五)swig模板
- ARC和非ARC在项目中转换
- [Spark] 用Maven构建Spark项目时可能出现的问题
- react 调用项目中的 .html 文件
- 04分布式电商项目 - Dubbox 简介
- 《Unity虚拟现实开发实战》——第3章,第3.3节为 Oculus Rift构建项目
- eclipse构建maven的web项目
- 使用Maven构建Android项目
- 通过webhook构建Jenkins项目
- Jenkins构建自由风格的项目
- 《Xcode实战开发》——2.2节创建项目
- Python新闻网站项目-1.项目分析与产品设计
- 本地构建自己的chatgpt已成为可能,国外团队从GPT3.5提取大规模数据完成本地机器人训练,并开源项目源码和模型支持普通在笔记上运行chatgpt
- GPU教程之开始在 Python 中快速使用 GPU 进行数据科学项目(教程含源码)
- 在Redhat上为.Net 项目构建基于Jenkins + Github + Mono 的持续集成环境
- Vue2.0+Webpack项目环境构建到发布
- eclipse下构建maven spring项目
- Jenkins_多项目构建(一):单独建立一个项目按顺序执行其它job
- vuejs项目性能优化总结
- 关于web项目,可以利用相关的jar包快速构建,实现数据同步、内网穿透、消息推送、日志监听等功能,快速实现web通用功能,专注与业务代码的实现即可,主要技术aop、netty、jdbc、Socket
- 版本控制工具 Git SourceTree 项目初始化和添加功能分支2
- 06 IntelliJ IDEA构建多模块项目
- eclipse打开多个Console窗口显示springboot项目启动情况