Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

web sphere and axis

104 views
Skip to first unread message

chamal....@gmail.com

unread,
Sep 7, 2005, 1:22:48 PM9/7/05
to
Hi,

I want to run web service using axis from web sphere.
Can we use axis with web sphere. How can we do that.

Best Regards,
Chamal.

Cyrille Le Clerc

unread,
Sep 7, 2005, 4:21:03 PM9/7/05
to
Hello Chamal,

WHAT IS THE PROBLEM BETWEEN AXIS & WEBSPHERE ?
----------------------------------------------

There is the same problem to use Axis with Websphere (I tested with
5.1.1.6 but 6.x should be the same) than with Weblogic 8.1 :
Axis' saaj.jar is conflicting with $WAS_HOME/lib/webservices.jar
provided by Websphere
If a detailed way to workaround it is described for Weblogic,
nothing is published yet for Websphere (see
http://ws.apache.org/axis/java/install.html#WebLogic8.1).


HOW TO WORKAROUND THIS PROBLEM ?
--------------------------------

You need to declare a shared library with Axis' saaj.jar, jaxrpc.jar
& wsdl4j.jar and associate this library with your Axis web application.

Official doc in the infocenter : "Managing shared libraries"
http://publib.boulder.ibm.com/infocenter/wasinfo/v5r1//topic/com.ibm.websphere.base.doc/info/aes/ae/tcws_sharedlib.html

Here is a workaround tested with Axis-1.2.1 & Websphere-5.1.1.6 :
1) Open Websphere Web Admin Console
2) In Environment / Shared Libraries, create a new Shared Library (e.g.
at Node scope) :
- Name="Axis Library"
- Value= <copy the three entries below and keep line breaks>
"/path/to/axis/jars/saaj.jar
/path/to/axis/jars/jaxrpc.jar
/path/to/axis/jars/wsdl4j.jar"
3) Install your Web Application axis.war
4) In Applications / Axis_war / Libraries, add library "Axis Library"
5) Save
6) Start your "Axis" enterprise application
7) check http://localhost:9080/axis/happyaxis.jsp, you will see the
location "/path/to/axis/jar/*" for the following components :
- Found SAAJ API ( javax.xml.soap.SOAPMessage ) at ...
- Found JAX-RPC API ( javax.xml.rpc.Service ) at ...
- Found IBM's WSDL4Java ( com.ibm.wsdl.factory.WSDLFactoryImpl ) at
...

Hope this helps,

Cyrille
--
Cyrille Le Clerc
clec...@fr.ibm.com
cyrille...@fr.ibm.com

svi...@gmail.com

unread,
Sep 9, 2005, 11:39:11 PM9/9/05
to
I think there's one step (or two) missing from the excellent
instructions Cyrille has provided. The following configuration
settings must be specified for the Axis is being used from:

Enterprise Application Classloader Mode: PARENT_LAST
War Classloader Policy: Module
Web Module Classloader Mode: PARENT_FIRST

The Enterprise Application Classloader Mode must be set to PARENT_LAST
to ensure that the new shared library (saaj.jar, wsdl.jar and
jaxrpc.jar) is loaded before webservices.jar and the Web Module
Classloader Mode must be PARENT_FIRST (the default mode) to ensure the
jar files in the new shared library are loaded before jar files that
were deployed with the Axis-enabled web module.

Cheers,

Steve

Cyrille Le Clerc

unread,
Sep 12, 2005, 6:46:36 PM9/12/05
to
Hi Steve,

I confirm your classloaders details ; these were the default values:
* Application Server
-> Application classloader policy : Multiple
* Enterprise Application
-> Classloader Mode : PARENT_LAST
-> WAR Classloader Policy : Module
* Web Module :
-> ClassLoader Mode : PARENT_FIRST

Cyrille
--
Cyrille Le Clerc

clec...@pobox.com
cyrille...@fr.ibm.com

Cyrille Le Clerc

unread,
Oct 12, 2005, 1:21:59 PM10/12/05
to
There may be a LinkageError on QName if you do not include axis.jar in
the shared library (see detailed stack trace below). This problem
requires to include axis.jar in the shared library (yet another
classloader issue).

So the steps are :

Here is a workaround tested with Axis-1.2.1 & Websphere-5.1.1.6 :
1) Open Websphere Web Admin Console
2) In Environment / Shared Libraries, create a new Shared Library (e.g.
at Node scope) :
- Name="Axis Library"

- Value= <copy the four entries below and keep line breaks>
"/path/to/axis/jars/axis.jar


/path/to/axis/jars/saaj.jar
/path/to/axis/jars/jaxrpc.jar
/path/to/axis/jars/wsdl4j.jar"
3) Install your Web Application axis.war
4) In Applications / Axis_war / Libraries, add library "Axis Library"

5) Check the following classloader policies


* Application Server
-> Application classloader policy : Multiple
* Enterprise Application
-> Classloader Mode : PARENT_LAST
-> WAR Classloader Policy : Module
* Web Module :
-> ClassLoader Mode : PARENT_FIRST

5) Save
6) Start your "Axis" enterprise application
7) check http://localhost:9080/axis/happyaxis.jsp, you will see the
location "/path/to/axis/jar/*" for the following components :
- Found SAAJ API ( javax.xml.soap.SOAPMessage ) at ...
- Found JAX-RPC API ( javax.xml.rpc.Service ) at ...
- Found IBM's WSDL4Java ( com.ibm.wsdl.factory.WSDLFactoryImpl ) at

Cyrille


Detailed stack trace

[10/12/05 18:18:11:235 CEST] ec7de1a EXCEPTIONS I
org.apache.axis.EXCEPTIONS TRAS0014I: The following exception was
logged java.lang.LinkageError: Class javax/xml/namespace/QName violates
loader constraints: definition mismatch between parent and child
loaders
at org.apache.axis.wsdl.fromJava.Emitter.writeBinding(Emitter.java:895)

0 new messages