Question : I am new to webservices, please help.

I am new to webservices, I have started with creating a jws file which I was able to do successfully. Now when trying to use wsdl2java tool from command prompt. I am gettgin


 
C:\Program Files\Apache Software Foundation\Tomcat 6.0\webapps\axis>java -classpath org.apache.axis
wsdl.wsdl2java "http://localhost:8080/axis/TaxService.jws?wsdl"
Exception in thread "main" java.lang.NoClassDefFoundError: http://localhost:8080/axis/TaxService/jw
?wsdl
Caused by: java.lang.ClassNotFoundException: http:..localhost:8080.axis.TaxService.jws?wsdl
        at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
Could not find the main class: http://localhost:8080/axis/TaxService.jws?wsdl.  Program will exit.

Answer : I am new to webservices, please help.

it means you don't have compelete set of jar's in classpath for you to run that command.

If you are using eclipse it will help you to solve this problem very easily, just create a Dynamic web project and copy your WSDL in to that. Right click on the WSDL, you will find "Generate WebService" option if you select the WSDL to java options from there on it take care of adding the required axis jars to the project and gets you the complete service code!
Random Solutions  
 
programming4us programming4us