You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Alan South <al...@tele2.com> on 2008/06/11 09:08:30 UTC
java2wsdl : how to get this working with an axis2 sample
Problem: java2wsdl gives error "An error occured while generating
codejava.lang.ClassNotFoundException:
samples.quickstart.service.pojo.StockQuoteServic
e"
It took me a long time to get wsdl2java working, and on the way I checked
out the mail lists, which didn't help, although the problem seems common.
I hope that this will save other rookies time.
I enclose the console log, which shows what needs to be done.
-I have used the samples/quickstart example.
-Basically, ant generates the classes in build/classes
-java2wsdl needs this value in the -cp parameter...,
Have fun.
Alan South
----------------------------------------------------------
C:\axis2-1.4\samples\quickstart>ant
Buildfile: build.xml
compile.service:
[mkdir] Created dir: C:\axis2-1.4\samples\quickstart\build
[mkdir] Created dir: C:\axis2-1.4\samples\quickstart\build\classes
[javac] Compiling 1 source file to C:\axis2-1.4
\samples\quickstart\build\classes
[javac] Note: C:\axis2-1.4
\samples\quickstart\src\samples\quickstart\service\pojo\StockQuoteService.java
uses unchec
ked or unsafe operations.
[javac] Note: Recompile with -Xlint:unchecked for details.
generate.service:
[copy] Copying 1 file to C:\axis2-1.4\samples\quickstart\build\classes
[jar] Building jar: C:\axis2-1.4
\samples\quickstart\build\StockQuoteService.aar
BUILD SUCCESSFUL
Total time: 1 minute 11 seconds
C:\axis2-1.4\samples\quickstart>java2wsdl
C:\axis2-1.4\samples\quickstart>c:\axis2-1.4\bin\java2wsdl -cp . -cn
samples.quickstart.service.pojo.StockQuoteService -
of StockQuoteService.wsdl
Using AXIS2_HOME: c:\axis2-1.4
Using JAVA_HOME: c:\Program Files\Java\jdk1.5.0_11
An error occured while generating codejava.lang.ClassNotFoundException:
samples.quickstart.service.pojo.StockQuoteServic
e
C:\axis2-1.4\samples\quickstart>java2wsdl
C:\axis2-1.4\samples\quickstart>c:\axis2-1.4\bin\java2wsdl -cp
build/classes -cn samples.quickstart.service.pojo.StockQu
oteService -of StockQuoteService.wsdl
Using AXIS2_HOME: c:\axis2-1.4
Using JAVA_HOME: c:\Program Files\Java\jdk1.5.0_11
[WARN] Unable to generate EPR for the transport : http
C:\axis2-1.4\samples\quickstart>dir
Volume in drive C has no label.
Volume Serial Number is B004-CA8F
Directory of C:\axis2-1.4\samples\quickstart
2008-06-11 08:27 <DIR> .
2008-06-11 08:27 <DIR> ..
2008-06-11 07:58 <DIR> build
2008-03-15 13:52 2 846 build.xml
2008-06-11 08:27 125 java2wsdl.bat
2008-06-11 07:46 113 java2wsdl.bat~
2008-06-11 07:55 2 004 java2wsdl.txt
2008-06-11 07:52 27 java2wsdl1.bat
2008-01-07 12:29 1 626 README.txt
2008-06-10 09:11 <DIR> resources
2008-06-10 09:11 <DIR> src
2008-06-11 08:27 5 717 StockQuoteService.wsdl
7 File(s) 12 458 bytes
5 Dir(s) 67 881 105 920 bytes free
C:\axis2-1.4\samples\quickstart>
----------------------------------------------------------
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org