我对 java 和 web 服务都比较陌生,所以它必须是显而易见的。很可能与类路径有关。我的类文件位于相对于当前目录的目录“src/ibmwebservicetutorial/service/”下。知道我在做什么错吗?
wsgen -classpath . src/ibmwebservicetutorial/service/OrderProcessService -wsdl
Exception in thread "main" java.lang.NoClassDefFoundError: IllegalName: src/ibmwebservicetutorial/service/OrderProcessService
at java.lang.ClassLoader.preDefineClass(ClassLoader.java:477)
at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
at java.net.URLClassLoader.access$000(URLClassLoader.java:56)
at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
at com.sun.tools.internal.ws.wscompile.WsgenOptions.getClass(WsgenOptions.java:276)
at com.sun.tools.internal.ws.wscompile.WsgenOptions.validateEndpointClass(WsgenOptions.java:212)
at com.sun.tools.internal.ws.wscompile.WsgenOptions.validate(WsgenOptions.java:203)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.sun.tools.internal.ws.Invoker.invoke(Invoker.java:105)
at com.sun.tools.internal.ws.WsGen.main(WsGen.java:41)