Hi,
I'm a beginner of the axis. I got a simple web
service deployed called MyEcho, which is just a duplicate version of
samples.userguide.example3.MyService. My TestClient works
fine with it.
Then I used Java2WSDL, and generated a wsdl file
for MyEcho.java. Next, I convert this wsdl file to java code for
both client and server side by using WSDL2Java. I implemented
the MyEchoSoapBindingImpl.java, and deployed it(after undeployed the previous
one). My TestClient also works fine with this service.
:-)
However, when I tried to implement a
client side tester ( followed the instruction on Axis User's Guide), I got
following exception at the runtime.
% java samples.myservice.echo.MyEchoClient
"test"
Exception in thread "main" java.lang.IncompatibleClassChangeError: Implementing class at java.lang.ClassLoader.defineClass0(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:486) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:111) at java.net.URLClassLoader.defineClass(URLClassLoader.java:248) at java.net.URLClassLoader.access$100(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:297) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:286) at java.lang.ClassLoader.loadClass(ClassLoader.java:253) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:313) at samples.myservice.echo.MyEchoClient.main(MyEchoClient.java:13) My simple client side tester is:
---------------------------------------------------
package samples.myservice.echo;
public class MyEchoClient
{ public static void main(String [] args) throws Exception { String textToSend; if
((args == null) || (args.length < 1))
{
textToSend = "<nothing>"; } else { textToSend = args[0]; } MyEchoService myecho = new MyEchoServiceLocator(); MyEcho mystub = myecho.getMyEcho(); String ret = mystub.myEchoService(textToSend);
System.out.println("You Typed: " + ret);
} }
Line 13 is: MyEchoService myecho = new
MyEchoServiceLocator();
I used JDK1.3, axis beta 2, tomcat
4.0.3
Thanks for any help,
Ying
|