• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

JAVA2WSDL in AXIS2

 
Ranch Hand
Posts: 170
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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>
 
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Can you help me I can not solve it!! Where I should store the package QuickStart?
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 51
Hibernate Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
Greenhorn
Posts: 1
Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It is because the java2wsdl.sh actually try to convert the class file to wsdl instead of java file.
you have to switch to the build directory which have the related class file, then run the generation should success.
e.g.
the class file is located in : classes/samples/quickstart/service/pojo/StockQuoteService.class
then : cd classes && $AXIS2_HOME/bin/java2wsdl.sh -cp . -cn samples.quickstart.service.pojo.StockQuoteService -of test.wsdl
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic