Search code examples
javaaxisapache-axis

Apache Axis cannot find WSDL2Java class


I have used Apache Axis in the past to generate a Java client from a wsdl. Since then I received a new laptop and I am trying to get Axis setup again. I am running Windows 10 and I'm trying the commands in both Git for Windows as well as in the windows command prompt.

My setup is such, I have AXIS2_HOME=%USERPROFILE%\development\Apache\axis2-1.7.9 and my PATH includes %AXIS2_HOME%\bin and %AXIS2_HOME%. I have the same setup for Axis 1.4 AXIS_HOME=%USERPROFILE%\development\Apache\axis-1.4 and PATH includes %AXIS_HOME%\bin, %AXIS_HOME%\bin.

For Axis2, when I run $AXIS2_HOME/bin/wsdl2java.sh -cp $AXISCLASSPATH -uri ./SI_Z_EUPM_SHPFLRI_BREAKDOWN_START_OIService.wsdl in Git BASH my output is simply

 Using AXIS2_HOME: /c/Users/aa99988/development/Apache/axis2-1.7.9
 Using JAVA_HOME:  C:\Users\aa99988\development\languages\Java\openJDK_8
Error: Could not find or load main class org.apache.axis2.wsdl.WSDL2Java

The same response is given if I set up windows command accordingly.

Regardless of which Axis version I use, I get the same response.

How can I fix this?


Solution

  • I resolved the issue by using Apache Axis 1.4 and executing the commands from windows command prompt.