function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
tyweedtyweed 

Can't generate java clases from Enterprise.wsdl (I have done my homework please help)

Ok. where to start. I have tomcat 4.1 installed at c:\tomcat4.1.

 

I have axis in C:\Tomcat4.1\webapps\axis. I have added this to my classpath

 

set CLASSPATH="C:\Tomcat4.1\webapps\axis\WEB-INF\lib\*"

 

lib has following jars:

 

axis

axis-ant

commons-logging-1.0.4

commons-discovery-0.2

jaxrpc

log4j-1.2.8

saaj

wsdl4j-1.5.1

 

I have read mail & activation must also be there however they were not in axis-bin_1.4 i downloaded. I'm thinking about taking those two from an axis2 i downloaded and moving them into lib but seems kinda strange to be mixig jars from different versions.

 

So I start tomcat and go to  http://localhost:8080/axis/happyaxis.jsp and everything is ok except for an optional element:

 

Warning: could not find class org.apache.xml.security.Init from file xmlsec.jar
XML Security is not supported.
See http://xml.apache.org/security/

 

 

I'm assuming this is not my problem.

 

Now i try to go to the command line and enter:

 

C:\Documents and Settings\steve>java org.apache.axis.wsdl.WSDL2Java -a "C:\Tomca
t4.1\webapps\axis\enterprise.wsdl"
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/axis/wsdl/
WSDL2Java
Caused by: java.lang.ClassNotFoundException: org.apache.axis.wsdl.WSDL2Java
        at java.net.URLClassLoader$1.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClassInternal(Unknown Source)
Could not find the main class: org.apache.axis.wsdl.WSDL2Java.  Program will exi
t.

 

Then from reading around i have seen it is the setting up the classpath that is the most common issue so i try to explicitly enter in the class path:

 

java –classpath c:\Tomcat4.1\webapps\axis\WEB-INF\lib\axis.jar;C:\Tomcat4.1\webapps\axis\WEB-INF\lib\axis-ant.jar;C:\Tomcat4.1\webapps\axis\WEB-INF\lib\commons-discovery-0.2.jar;C:\Tomcat4.1\webapps\axis\WEB-INF\lib\commons-logging-1.0.4.jar;C:\Tomcat4.1\webapps\axis\WEB-INF\lib\jaxrpc.jar;C:\Tomcat4.1\webapps\axis\WEB-INF\lib\log4j-1.2.8.jar;C:\Tomcat4.1\webapps\axis\WEB-INF\lib\saaj.jar;C:\Tomcat4.1\webapps\axis\WEB-INF\lib\wsdl4j-1.5.1.jar;C:\Tomcat4.1\webapps\axis\WEB-INF\lib\wsdl4j-1.5.1.jar;  org.apache.axis.wsdl.WSDL2Java -a C:\Tomcat4.1\webapps\axis\enterprise.wsdl


C:\Documents and Settings\steve>java -classpath c:\Tomcat4.1\webapps\axis\WEB-IN
F\lib\axis.jar;C:\Tomcat4.1\webapps\axis\WEB-INF\lib\axis-ant.jar;C:\Tomcat4.1\w
ebapps\axis\WEB-INF\lib\commons-discovery-0.2.jar;C:\Tomcat4.1\webapps\axis\WEB-
INF\lib\commons-logging-1.0.4.jar;C:\Tomcat4.1\webapps\axis\WEB-INF\lib\jaxrpc.j
ar;C:\Tomcat4.1\webapps\axis\WEB-INF\lib\log4j-1.2.8.jar;C:\Tomcat4.1\webapps\ax
is\WEB-INF\lib\saaj.jar;C:\Tomcat4.1\webapps\axis\WEB-INF\lib\wsdl4j-1.5.1.jar;C
:\Tomcat4.1\webapps\axis\WEB-INF\lib\wsdl4j-1.5.1.jar;  org.apache.axis.wsdl.WSD
L2Java -a C:\Tomcat4.1\webapps\axis\enterprise.wsdl
Exception in thread "main" java.lang.NoClassDefFoundError: ûclasspath
Caused by: java.lang.ClassNotFoundException: ûclasspath
        at java.net.URLClassLoader$1.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClassInternal(Unknown Source)
Could not find the main class: GÇôclasspath.  Program will exit.

 

 

 

I'm confused when you enter in java org.apache.axis.wsdl.WSDL2Java  where exactly is "org.apache.axis.wsdl.WSDL2Java"  it was not in the axis1.4 bin from what i could see the onlything close was wsdl4j?  I'm not seeing that in java as well. I thought wsdl2java was part of the axis package? I go into axis2-1.4.1 and there does exist wdsl2java ? Do i have the wrong axis? I was told not to use axis2 instead axis1.4.

 

Please i'm so frustrated and have tried everything i can possibly think of.

I need help!

 

tyweedtyweed

Ok, after more tinkering there seemed to be an issue with the "-" sign in front of the classpath parameter.After fixing this i get new error.

 

C:\Documents and Settings\steve>java -classpath c:\Tomcat4.1\webapps\axis\WEB-IN
F\lib\axis.jar;C:\Tomcat4.1\webapps\axis\WEB-INF\lib\axis-ant.jar;C:\Tomcat4.1\w
ebapps\axis\WEB-INF\lib\commons-discovery-0.2.jar;C:\Tomcat4.1\webapps\axis\WEB-
INF\lib\commons-logging-1.0.4.jar;C:\Tomcat4.1\webapps\axis\WEB-INF\lib\jaxrpc.j
ar;C:\Tomcat4.1\webapps\axis\WEB-INF\lib\log4j-1.2.8.jar;C:\Tomcat4.1\webapps\ax
is\WEB-INF\lib\saaj.jar;C:\Tomcat4.1\webapps\axis\WEB-INF\lib\wsdl4j-1.5.1.jar;C
:\Tomcat4.1\webapps\axis\WEB-INF\lib\wsdl4j-1.5.1.jar;  org.apache.axis.wsdl.WSD
L2Java -a C:\Tomcat4.1\webapps\axis\enterprise.wsdl
- Unable to find required classes (javax.activation.DataHandler and javax.mail.i
nternet.MimeMultipart). Attachment support is disabled.
java.io.FileNotFoundException: C:\Tomcat4.1\webapps\axis\enterprise.wsdl (The sy
stem cannot find the file specified)
        at java.io.FileInputStream.open(Native Method)
        at java.io.FileInputStream.<init>(Unknown Source)
        at java.io.FileInputStream.<init>(Unknown Source)
        at sun.net.www.protocol.file.FileURLConnection.connect(Unknown Source)
        at sun.net.www.protocol.file.FileURLConnection.getInputStream(Unknown So
urce)
        at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.setupCurrent
Entity(Unknown Source)
        at com.sun.org.apache.xerces.internal.impl.XMLVersionDetector.determineD
ocVersion(Unknown Source)
        at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(U
nknown Source)
        at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(U
nknown Source)
        at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown So
urce)
        at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(Unknown So
urce)
        at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(Unk
nown Source)
        at org.apache.axis.utils.XMLUtils.newDocument(XMLUtils.java:369)
        at org.apache.axis.utils.XMLUtils.newDocument(XMLUtils.java:420)
        at org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.jav
a:482)
        at org.apache.axis.wsdl.gen.Parser$WSDLRunnable.run(Parser.java:361)
        at java.lang.Thread.run(Unknown Source)

 

Any ideas what might be causing this? i googled it and found much of nothing.

vreddyvreddy

I am also facing the same problem.

 

I could not even find the file WSDL2Java. Searched in possible locations on my system.

 

Any help is greatly appreciated.

 

Thanks.

TomCusack29TomCusack29

http://wiki.apexdevnet.com/index.php/Java_Quick_Start

 

Have a look at this, let me know if you have any problems.

I have a bat file at home which worksand might help you run the WSDL2JAVA from Axis