Websphere7下部署axis2和cxf

 

axis2下载:http://axis.apache.org/axis2/java/core/download.cgi
最新的是1.6.2. 将下载的war包直接部署websphere7时,会报错。
官方文档:http://axis.apache.org/axis2/java/core/docs/app_server.html
对在websphere下部署1.6.2给了详细的方案。但依然部署失败。报错为module available。
axis2官方给的部署方案:
1.Before deploying the Axis2 WAR, edit the axis2.xml file and set the EnableChildFirstClassLoading parameter to true.
Please note that this parameter is only supported in Axis2 1.5.5 or higher. The parameter is already present in the default axis2.xml
file included in the WAR distribution, but its value is set to false. Therefore it is enough to change the parameter value.
2.After deployment, modify the application configuration to enable parent last class loading for the Web module: in the WebSphere admin console, go the the configuration page for the enterprise application, click on Manage Modules and locate the WAR containing Axis2 (in the default WAR distribution,
the module is called Apache-Axis2), then change the Class loader order option to Classes
loaded with local class loader first (parent last). Note that the class loader policy for the enterprise application itself (which can be specified under Class loading and update detection) is irrelevant, unless a custom EAR distribution is used that includes the Axis2 libraries in the EAR instead of the WAR.

 

无奈之下查websphere的文档。。
IBM针对websphere7下axis2和cxf的部署安装有专门的文档和示范例子供下载:
http://www.ibm.com/developerworks/websphere/library/techarticles/1001_thaker/1001_thaker.html
文档是09年写的,里面的axis2是1.5版的。
可惜,按照1.5版的方法部署1.62还是失败,报异常:
servlet AxisAdminServlet 创建了未捕获到的 init() 异常:
javax.servlet.ServletException: javax.servlet.ServletException:
org.apache.axis2.AxisFault: The system is attempting to engage a module that is not available: addressing
最后,无奈还是选了axis2 1.5版的,按照示例,部署服务成功。
IBM文档里面有详细的图示,就不上图了。

 

简而言之,三个步骤:
1.应用的 class loader顺序配置变为本地包优先。
2.war包里面META-INF里面的MANIFEST.MF加上:DisableIBMJAXWSEngine:true
3.如果标准的axis1.5部署还是失败,将IBM示例的axis1.5 lib下所有jar包覆盖标准包,标准lib中可能少jar包导致。

以上三步做完,重新启动websphere服务器。

 

CXF按照IBM示范文档部署正常,不多说了。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值