`
hjs0512
  • 浏览: 33650 次
  • 性别: Icon_minigender_1
  • 来自: 深圳
社区版块
存档分类
最新评论

在WebSphere发布CXF注意事项

阅读更多

在CXF官网搜索到的:

https://cwiki.apache.org/confluence/display/CXF20DOC/Application+Server+Specific+Configuration+Guide#ApplicationServerSpecificConfigurationGuide-Websphere

Websphere

Currently, I've only found on way to make cxf work with websphere: adding jars to the 'endorsed' folder. (*Note: this has been validated against Websphere6.1.0.0, 6.1.0.19, and 6.1.0.27 *)

No Web Services Feature Pack for WebSphere installed

put jar in the endorsed folder

  • put the wsdl4j-1.6.1.jar in the $WebSphere_HOME/java/jre/lib/endorsed folder.
  • In the WebSphere console, find the specific enterprise application, click the "Class loading and update detection".
    • Mark the "Classes loaded with application class loader first" selected.
    • Mark the "Class loader for each war file in application" selected.

And then restart the Websphere server. (Because we changed the endorsed folder, we need to restart it to make it take effect).

Please make sure your classpath doesn't have the servlet-2.5 library, since WebSphere6.1 is servlet-2.4 compliant!

Add your own class loader

If you put your wsdl4j-1.6.1 jar in $WAS_HOME/java/jre/lib/endorsed, all your applications will depend on your version of wsdl4j. Another solution is to create a new class loader in your server which loads before parent class loader, create a shared library with your version of wsdl4j, and add this shared library to your new class loader. This version of wsdl4j will only be available for your specific server and not affect applications running in other servers.

Step by step

  1. In the WAS console navigate to Environment > Shared Libraries
  2. Select the scope you wish your library should be visible in
  3. Click New and set values ex: name=MYAPP_SHARED_LIB, classpath=PATH_TO/wsdl4j-1.6.2.jar and Save
  4. Navigate to Application servers > [your server name] > Java and Process Management > Class loader > New
  5. Select Classes loaded with application class loader first and Save
  6. Select your new class loader and click Shared library references
  7. Add your shared library (MYAPP_SHARED_LIB) Save and restart your server.

Tested in WAS 6.1 only but should work in earlier versions as well.

Another user running WS6.1 FP 23 without the web services feature pack came up with this solution that seemed to work for them:

Create a shared library with the following jars:
jsr173_api-1.0.jar
jaxp-ri-1.4.2.jar
saaj-impl-1.3.2.jar
wsdl4j-1.6.2.jar

Create a new parent-first classloader and have it reference the shared library you just created. Restart everything and it should work.

Web Services Feature Pack for WebSphere Installed

Things are way more complicated if the Web Services Feature Pack for WebSphere is installed. With this feature pack installed, it is impossible to deploy an application using CXF, because the WebSphere Web Services engine starts parsing the JAX-WS annotations of the services and tries to deploy the services.

Up to fixpack 27 (6.1.0.27) there was no possibility to disable the WebSphere Web Services engine.

In October 2009, IBM reacted to the problem and released the following fix:

  PK96989: ENABLE USE OF THIRD PARTY JAX-WS WEB SERVICES ENGINE IN WEBSPHERE

This fix requires at least fixpack 27 (6.1.0.27). It allows to disable the WebSphere Web Services
engine for the whole JVM by setting the JVM property

  com.ibm.websphere.webservices.DisableIBMJAXWSEngine=true

or to disable the engine just for a specific module by adding

  DisableIBMJAXWSEngine: true

to WAR/META-INF/MANIFEST.MF.

According to IBM, this fix shall be included into fixpack 29.

For details, please see http://www-01.ibm.com/support/docview.wss?rs=180&uid=swg1PK96989

The WebSphere team has also added instructions for using third party JAX-WS applications to their tech articles: http://www.ibm.com/developerworks/websphere/library/techarticles/1001_thaker/1001_thaker.html

分享到:
评论

相关推荐

    websphere下部署CXF项目jar包冲突问题解决方式

    在websphere8.5 下部署含有CXFwebservice的war包无法正常启动,而相应的war包在tomcat上是可以正常启动的,通过后台的日志分析大致可以定位为相关的cxf类无法找到,其实这些类在项目的lib目录下都是存在的,莫名其妙...

    cxf webService简单例子

    【标题】"cxf webService简单例子"是一个关于使用Apache CXF框架...在这个"简单例子"中,我们很可能会看到上述步骤的具体实现,通过阅读源码和运行例子,可以更深入地理解CXF框架的工作原理及其在Web服务开发中的应用。

    WebSphere应用发布详解

    ### WebSphere应用发布详解 #### 一、WebSphere概述与安装配置 **WebSphere** 是IBM推出的一款企业级应用服务器,主要用于部署、管理和监控Java EE应用程序。它支持多种操作系统平台,如Windows、Linux、Solaris等...

    WebSphere Aplication Servic&Portal/cxf学习资料

    WebSphere Aplication Servic&Portal学习资料/cxf学习资料 超值

    websphere发布项目

    在介绍如何在 WebSphere 7.0 上发布项目之前,首先需要确保 WebSphere 服务已经被正确启动。 ##### 1.1 通过 Windows 的“服务”启动 - 打开 Windows 的“服务”管理器。 - 查找与 WebSphere 相关的服务,例如...

    websphere发布应用程序

    在正式介绍如何使用WebSphere发布应用程序之前,我们先了解一下发布前需要准备的工作: 1. **安装WebSphere Application Server**:确保已经正确安装了WebSphere Application Server,并且安装过程中选择了适当的...

    websphere 6.1 资料集

    2. **Linux安装**:文件名中多次提到在Linux环境下安装Websphere,因此这部分内容将详细阐述在Linux操作系统上安装Websphere的特殊注意事项,比如处理权限问题、依赖库的安装、与Linux服务的集成等。 3. **VMware上...

    Websphere部署发布步骤

    本文将详细介绍Websphere 7.0的部署和发布过程,帮助你理解如何在该平台上配置和管理应用程序。 1. **安装Websphere 7.0** - 首先,你需要下载并安装Websphere Application Server 7.0。安装过程中,只需选择安装...

    在windows以及linux上安装websphere以及发布项目

    本指南将详细介绍如何在Windows和Linux操作系统上安装WebSphere Application Server(WAS),并进行WAR项目的发布。 1. **Windows上的WebSphere安装** - **下载与准备**:首先,你需要从IBM官方网站获取WebSphere...

    部署cxf服务到was7的步骤

    部署CXF服务到WebSphere 7.0的过程中需要注意细节较多,尤其是对JAR文件的配置和MANIFEST.MF文件的修改尤为重要。遵循上述步骤,可以顺利完成部署工作。此外,合理的测试计划也是保证服务质量的重要环节。希望本文能...

    项目发布到websphere的步骤

    在将项目发布到websphere之前,需要将项目压缩为war文件。在eclipse项目列表中选中待发布的项目,右键选择Export,弹出Export界面,选择J2EE-WAR file。然后,选择要压缩的项目,直接点击Browse选择要存放的地址,...

    WEBSPHERE乱码问题的解决和处理

    /opt/IBM/WebSphere/AppServer/classes:/opt/IBM/WebSphere/AppServer/lib:/opt/IBM/WebSphere/AppServer/installedChannels:/opt/IBM/WebSphere/AppServer/lib/ext:/opt/IBM/WebSphere/AppServer/web/help:/opt/IBM...

    linux websphere5安装注意问题

    ### Linux环境下WebSphere 5安装注意事项...以上是关于在Linux环境下安装WebSphere 5的一些关键步骤和注意事项。按照这些指导进行操作可以帮助您顺利完成安装,并确保WebSphere应用服务器能够稳定地运行在Linux环境中。

Global site tag (gtag.js) - Google Analytics