You need to sign in to do that
Don't have an account?
Motoki
WSDL2Java help
I'm a newbie in this Salesfore Java developement... i just want to write a very simple Java program that do some salesforce queries like inserting, upserting data... like the quickstartJava sample...
My current set up is:
Tomcat 4.1
Java SDK 1.5
Axis 1.4
When i tried to convert the enterprise.wsdl from my salesforce account to java classes, i got a list of exception errors... can someone help me understand what is going on? Many thanks!
Code:
java org.apache.axis.wsdl.WSDL2Java enterprise.wsdl log4j:WARN No appenders could be found for logger (org.apache.axis.i18n.ProjectR esourceBundle). log4j:WARN Please initialize the log4j system properly. Exception in thread "main" java.lang.NoClassDefFoundError: javax.wsdl.Definition at org.apache.axis.wsdl.toJava.JavaGeneratorFactory.class$(JavaGenerator Factory.java:68) at org.apache.axis.wsdl.toJava.JavaGeneratorFactory.addDefinitionGenerat ors(JavaGeneratorFactory.java:179) at org.apache.axis.wsdl.toJava.JavaGeneratorFactory.addGenerators(JavaGe neratorFactory.java:133) at org.apache.axis.wsdl.toJava.JavaGeneratorFactory.<init>(JavaGenerator Factory.java:111) at org.apache.axis.wsdl.toJava.Emitter.<init>(Emitter.java:159) at org.apache.axis.wsdl.WSDL2Java.createParser(WSDL2Java.java:209) at org.apache.axis.wsdl.gen.WSDL2.<init>(WSDL2.java:96) at org.apache.axis.wsdl.WSDL2Java.<init>(WSDL2Java.java:194) at org.apache.axis.wsdl.WSDL2Java.main(WSDL2Java.java:371)
Thanks Simon,
That's strange... i have included the log4j-1.2.8.jar in the AXISCLASSPATH... but somehow it is not finding it...
I have fixed the missing classes issue but now when i execute the command again i got another Exceptions:
Is this because of the enterprise.wsdl is not well formed? Thanks!
Code:
Hi Simon, i'm sorry to bother you again... i tried add file:/// to the command line but i still get exception...
Thank you.
Code:
.;./lib/AXIS.jar;./lib/axis-ant.jar;./lib/commons-discovery-0.2.jar;
./lib/commons-logging-1.0.4.jar;./lib/jaxrpc.jar;./lib/saaj.jar;
./lib/wsdl4j-1.5.1.jar;./lib/log4j-1.2.8.jar;./lib/mail.jar;./lib/activation.jar
I haven't needed to add file:///
I also haven't needed to specify "file:///"
I use an ant build file and eclipse to generate mine. (I do specify the full classpath C:\ ... ).
Looking at your code ...
Is your wsdl in this directory?
D:\Documents and Settings\Richie Chik\Desktop\SecheduleCheck>
It may not like spaces in "Documents and Settings".
I've had that problem before.
Could you try:
java -classpath ./AXIS.jar;./axis-ant.jar;./commons-discovery-0.2.jar;./commons-logging-1.0.4.jar;./jaxrpc.jar;./saaj.jar;./wsdl4j-1.5.1.jar;./log4j-1.2.8.jar;./mail.jar;./activation.jar org.apache.axis.wsdl.WSDL2Java enterprise.wsdl
As long as everything is in the same directory (all jars and WSDL) this should just work for you.