使用Spring开发Axis web service服务器端
(那一套都是自动生成的,Locator,Service,ServiceImpl,Stub,Skeleton等等)
现需要在ServiceImpl中添加自己的逻辑,并且需要Spring中的Bean
我是使Skeleton继承了ServletEndpointSupport去获得Bean,在客户端调用(另一项目组)时发现获取不到Bean
但是如果自己使用Spring的ApplicationContext能够加载到(自己写了个main方法进行模拟客户端测试就能够获取)
Spring-references.pdf中有文字如下:
Our AccountServletEndpoint needs to run in the same web application as the Spring context to allow for
access to Spring's facilities. In case of Axis, copy the AxisServlet definition into your 'web.xml', and set up
the endpoint in 'server-config.wsdd' (or use the deploy tool). See the sample application JPetStore where the
OrderService is exposed as a web service using Axis.
我得理解是:只有调用该服务的客户端跟服务器端是跑在同一个上下文中才能使用Spring那一套东西。
真实情况是这样么?如果是那是不是有点太悲剧了,大部分客户端和服务器端还是不在同一个context中的吧?
怎样保证由客户端发起的web service调用能够获取到Spring容器中的Bean呢?
分享到:
相关推荐
spring与axis的整合
Spring整合axis2经典
spring和axis2 整合的小例子, WebContent\axis2-web\listServices.jsp 显示 所有 的 接口
spring集成axis发布webservice源码 spring集成axis发布webservice源码 spring集成axis发布webservice源码 spring集成axis发布webservice源码
spring3.2.5与axis2 1.6.2整合
axis2+spring2.5整合(webservice)
简单例子:axis2整合spring发布webservice,以及session的管理
springboot集成axis2-1.7.9部署和调用实例
使用axis2与spring3进行集成,实现的webservice服务。 资料为myeclipse下的web工程,可解压后直接导入。 发布到tomcat6下运行。
内有axis1.4jar包以及使用eclipse和axis1.4 将WSDL和服务端代码互转方法 亲测可用
Spring集成AXIS2的Web_service配置方法
Axis2WebService与Spring的整合
spring+axis2整合,项目下载之后就能使用,里面简单的编写的发布服务的代码,适合初学者使用
NULL 博文链接:https://shihuan830619.iteye.com/blog/1621542
NULL 博文链接:https://gjp014.iteye.com/blog/2332863
打着灯笼都难找的资源哦,是自己辛苦整理出来的,很有用哦。
NULL 博文链接:https://popomonkey.iteye.com/blog/680365
在网上找了很久的资料,接口已经跟客户对接,特编写了代码文档和附带jar包,并含其他网站的参考地址,注意jdk环境要1.6或以上版本
myeclipse8.5整合axis2所需要的jar
spring+axis集成webservice