`
lusterfly
  • 浏览: 99158 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

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示范文档部署正常,不多说了。

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics