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.
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
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
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
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
--
Cyrille Le Clerc
clec...@pobox.com
cyrille...@fr.ibm.com
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)