I have written the following code, which is meant to be a client wsdl for http://www.nanonull.com/TimeService/TimeService.asmx?WSDL:
package time;
class Client {
public static void main(String args[]){
TimeService service = new TimeService();
TimeServiceSoap port= service.getTimeServiceSoap();
String result = port.getTimeZoneTime("UTC+10");
System.out.println("Time is "+result);
}
}
But when I try to run it with java I get the following:
C:\Program Files\Java\jdk1.6.0_22\bin>java client.Client
Exception in thread "main" java.lang.NoClassDefFoundError: client/Client
Caused by: java.lang.ClassNotFoundException: client.Client
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: client.Client. Program will exit.
Does this error mean I should be importing any classes?