Using Axis2/Java to create code from WSDL

I'm attempting to make use of Axis2/Java to eat internet solutions. Specifically, I'm attempting to create Java skeletal system code from a WSDL documents.

I mounted the libaxis - java plan, yet the plan does not have the WSDL2Java.sh manuscript I was anticipating. I attempted to create the Java code by doing:

java -cp /usr/share/java/axis.jar org.apache.axis.wsdl.WSDL2Java foo.wsdl

But I get the adhering to mistake:

Exception in thread "main" java.lang.NoClassDefFoundError: org.apache.commons.logging.LogFactory
        at org.apache.axis.components.logger.LogFactory.class$(LogFactory.java:45)
        at org.apache.axis.components.logger.LogFactory$1.run(LogFactory.java:45)
        at java.security.AccessController.doPrivileged(Native Method)
        at org.apache.axis.components.logger.LogFactory.getLogFactory(LogFactory.java:41)
        at org.apache.axis.components.logger.LogFactory.<clinit>(LogFactory.java:33)
        at org.apache.axis.i18n.ProjectResourceBundle.<clinit>(ProjectResourceBundle.java:53)
        at org.apache.axis.i18n.MessagesConstants.<clinit>(MessagesConstants.java:32)
        at org.apache.axis.utils.Messages.<clinit>(Messages.java:36)
        at org.apache.axis.wsdl.WSDL2Java.<clinit>(WSDL2Java.java:112)
Could not find the main class: org.apache.axis.wsdl.WSDL2Java. Program will exit.
0
2019-05-18 23:25:58
Source Share
Answers: 2

You appear to be doing not have the commons - logging container in your classpath:

  1. Install Ubuntu plan libcommons-logging-java:

    sudo proper - get install libcommons - logging - java

  2. Append /usr/share/java/commons-logging.jar and also its about your classpath:

    java - cp/ usr/share/java/ axis.jar:/ usr/share/java/ commons - logging.jar:/ usr/share/java/ commons - logging - api.jar:/ usr/share/java/ commons - logging - adapters.jar org.apache.axis.wsdl.WSDL2Java foo.wsdl

It is fairly most likely that there will certainly be various other dependences missing out on ; you could intend to make use of the JarAnalyizer device to locate them and also include in the classpath.

0
2019-05-21 09:28:01
Source

Based on Riccardo Murri is solution, I had the ability to establish all the container files needed for the classpath:

java -cp /usr/share/java/axis.jar:/usr/share/java/commons-logging.jar:/usr/share/java/commons-logging-api.jar:/usr/share/java/commons-logging-adapters.jar:/usr/share/java/commons-discovery.jar:/usr/share/java/jaxrpc.jar:/usr/share/java/wsdl4j.jar org.apache.axis.wsdl.WSDL2Java foo.wsdl
0
2019-05-21 08:20:13
Source