This week's book giveaway is in the OCMJEA forum.
We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line!
See this thread for details.
The moose likes Web Services and the fly likes JAVA2WSDL in AXIS2 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "JAVA2WSDL in AXIS2" Watch "JAVA2WSDL in AXIS2" New topic


feda alshahwan
Ranch Hand

Joined: Jul 26, 2008
Posts: 170
I am using AXIS2 tomcat6 and jre1.6.0_07 and I created java project using net beans. but when I execute java2wsdl I am getting the following. Can you solve my problem? Also I would like to know what is the function of java2wsdl and its parameters?Thanks
C:\axis2-1.4-bin\axis2-1.4\bin>%AXIS2_HOME%\bin\java2wsdl -cp . -cn samples.quickstart.service.pojo.StockQuoteService -of StockQuoteService.wsdl
Using AXIS2_HOME: c:\axis2-1.4-bin\axis2-1.4
Using JAVA_HOME: C:\Program Files\Java\jre1.6.0_07
An error occured while generating codejava.lang.ClassNotFoundException: samples.quickstart.service.pojo.StockQuoteService

arun nohwar

Joined: Aug 05, 2008
Posts: 16
Suppose samples.quickstart.service.pojo.StockQuoteService is located in C:\abc directory.
Then change your command to following command:

feda alshahwan
Ranch Hand

Joined: Jul 26, 2008
Posts: 170
I did what you told me but still same
feda alshahwan
Ranch Hand

Joined: Jul 26, 2008
Posts: 170
Can you help me I can not solve it!! Where I should store the package QuickStart?
Sanjeev Gour

Joined: Aug 07, 2008
Posts: 1
Add the location of your class files to the user classpath variable. Then invoke the command-
java2wsdl.bat -cp %classpath% -cn yourpackage.classname

Don't add .class at the end of class name.

This is how I resolved it when I encountered.

Kamal Mettananda
Ranch Hand

Joined: Oct 25, 2005
Posts: 51

C:\axis2-1.4-bin\axis2-1.4\bin>%AXIS2_HOME%\bin\java2wsdl ...

Using AXIS2_HOME: c:\axis2-1.4-bin\axis2-1.4

1) Why are you using, %AXIS2_HOME%\bin\java2wsdl. You are already inside C:\axis2-1.4-bin\axis2-1.4\bin, so you would just use java2wsdl.

2) Classpath: You are trying to use the class named samples.quickstart.service.pojo.StockQuoteService. But you have set your classpath (-cp option) to "." which means your program should look for the .class file inside the current directory. Where have you saved your .class files?

Kamal Mettananda - SCJP 1.4 (98%)
I agree. Here's the link:
subject: JAVA2WSDL in AXIS2