0

I am using axis2 on Apache Tomcat. I am writing client side to consumer SOAP WS. I configured Eclipse to use Tomcat as a server and while executing that line

stub._getServiceClient().engageModule("addressing");

I was getting that error "unable to engage module addressing". To fix that issue I add following line in the VM arguments of run configuration

-Daxis2.repo="E:\axis2\repository"

Now I export my project as a war file and deploy it on the real server. But Now I am again getting the same error(I checked the log file). I don't know how to fix, can every one help me. Thanks

Humayun Shabbir
  • 2,961
  • 4
  • 20
  • 33
Waqas Ali
  • 1,642
  • 4
  • 32
  • 55
  • Do you have the address.mar in your assembly? Or in the axis2 repo? http://central.maven.org/maven2/org/apache/axis2/addressing/ – Brett Okken Jul 27 '14 at 19:43
  • Yeah, I have address.mar file in E:\axis2\repository\module directory. I am not getting this error in development because I have added following parameter -Daxis2.repo="E:\axis2\repository" in run configuration. – Waqas Ali Jul 27 '14 at 19:56
  • Do you have an axis repo defined at runtime? Have you included the axis artifacts in your war? – Brett Okken Jul 27 '14 at 20:00
  • No I didn't do something this. I just export the project as a war file and place it in webapps folder of tomcat. – Waqas Ali Jul 27 '14 at 20:06
  • I also create a setenv.bat file and add following line to add run time arguments set "CATALINA_OPTS = -Daxis2.repo=E:\axis2\repository" but it don't work – Waqas Ali Jul 27 '14 at 20:19
  • 1
    I solve my issue with this link http://stackoverflow.com/questions/2526012/how-do-i-use-ws-addressing-properly-in-an-axis2-client – Waqas Ali Jul 27 '14 at 20:22

1 Answers1

0

It got resolved on my side in the following way:

I had an outdated WEB-INF/modules/axis2-jaxws-mar*.mar or rather 2 versions of it and the classloader got the older one of it and AxisServlet didn't start altogether

java.lang.NoSuchMethodError: org.apache.axis2.engine.AxisConfiguration.getGlobalModules()Ljava/util/List; at org.apache.axis2.jaxws.module.JAXWSModule.registerGlobalModule(JAXWSModule.java:51)