Win a copy of Learn Spring Security (video course) this week in the Spring forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JAVA2WSDL in AXIS2

 
feda alshahwan
Ranch Hand
Posts: 170
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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

C:\axis2-1.4-bin\axis2-1.4\bin>
 
arun nohwar
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Suppose samples.quickstart.service.pojo.StockQuoteService is located in C:\abc directory.
Then change your command to following command:

 
feda alshahwan
Ranch Hand
Posts: 170
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I did what you told me but still same
 
feda alshahwan
Ranch Hand
Posts: 170
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can you help me I can not solve it!! Where I should store the package QuickStart?
 
Sanjeev Gour
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.

Sanjeev.
 
Kamal Mettananda
Ranch Hand
Posts: 51
Hibernate Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
Iliana Deetz
Greenhorn
Posts: 1
Chrome
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


First off , you must enter to the directory of StockQuoteService class and compile (in my case C:\axis2-1.6.2\samples\quickstart\src \samples\quickstart\service\pojo).
Then enter to src folder ( C:\axis2-1.6.2\samples\quickstart\src) to execute the command and this generate the WSDL file into such folder.

Remember that '-cp .' indicates the actual directory and '-cn'
specifies the qualified name of the class.

I hope be useful.Regards.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic