I am getting the same error running client for
Axis2SampleDocLitService WSDL as well. The client code looks like
this:
import org.apache.axis2.userguide.xsd.*;
import org.apache.axis2.userguide.xsd.impl.*;
import com.sample.*;
import org.apache.axis2.userguide.xsd.impl.*;
import com.sample.*;
import java.util.*;
public class Client{
public static void main(java.lang.String
args[]){
Axis2SampleDocLitServiceStub stub = null;
try{
stub = new Axis2SampleDocLitServiceStub(null,
"http://localhost:8080/axis2/services/Axis2SampleDocLitService");
echoString(stub);
} catch(Exception e){
e.printStackTrace();
}
}
Axis2SampleDocLitServiceStub stub = null;
try{
stub = new Axis2SampleDocLitServiceStub(null,
"http://localhost:8080/axis2/services/Axis2SampleDocLitService");
echoString(stub);
} catch(Exception e){
e.printStackTrace();
}
}
public static String
echoString(Axis2SampleDocLitServiceStub
stub){
try{
EchoStringParamDocument reqDoc00 = EchoStringParamDocument.Factory.newInstance();
reqDoc00.setEchoStringParam("echo");
try{
EchoStringParamDocument reqDoc00 = EchoStringParamDocument.Factory.newInstance();
reqDoc00.setEchoStringParam("echo");
EchoStringReturnDocument resDoc00 =
stub.echoString(reqDoc00);
return
resDoc00.getEchoStringReturn();
} catch(Exception e){
e.printStackTrace();
}
return null;
}
} catch(Exception e){
e.printStackTrace();
}
return null;
}
}
The runtime exception is:
C:\work\Axis2Sample>java -cp
build\classes;C:\software\axis2\lib\axis2-kernel-SNAPSHOT.jar;C:\software\axis2\lib\xbean-2.2.0.jar;.;C:\software\ax
is2\lib\axiom-api-1.1.1.jar;C:\software\axis2\lib\stax-api-1.0.1.jar;C:\software\axis2\lib\wsdl4j-1.6.1.jar;C:\software\axis2\lib\XmlSchema-SNAPS
HOT.jar;C:\software\axis2\lib\commons-logging-1.1.jar;C:\software\axis2\lib\neethi-SNAPSHOT.jar;C:\software\axis2\lib\stax-1.2.0.jar;C:\software\
axis2\lib\axiom-impl-1.1.1.jar;C:\software\axis2\lib\xbean-2.2.0.jar; Client
Exception in thread "main" java.lang.ExceptionInInitializerError
at org.apache.axis2.userguide.xsd.EchoStringParamDocument$Factory.newInstance(EchoStringParamDocument.java:50)
at Client.echoString(Client.java:23)
at Client.main(Client.java:15)
Caused by: java.lang.RuntimeException: Cannot load SchemaTypeSystem. Unable to load class with name schemaorg_apache_xmlbeans.system.s0C55B8F5926
240E3576E190A4CD282A2.TypeSystemHolder. Make sure the generated binary files are on the classpath.
at org.apache.xmlbeans.XmlBeans.typeSystemForClassLoader(XmlBeans.java:783)
at org.apache.axis2.userguide.xsd.EchoStringParamDocument.<clinit>(EchoStringParamDocument.java:19)
... 3 more
Caused by: java.lang.ClassNotFoundException: schemaorg_apache_xmlbeans.system.s0C55B8F5926240E3576E190A4CD282A2.TypeSystemHolder
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at org.apache.xmlbeans.XmlBeans.typeSystemForClassLoader(XmlBeans.java:769)
... 4 more
is2\lib\axiom-api-1.1.1.jar;C:\software\axis2\lib\stax-api-1.0.1.jar;C:\software\axis2\lib\wsdl4j-1.6.1.jar;C:\software\axis2\lib\XmlSchema-SNAPS
HOT.jar;C:\software\axis2\lib\commons-logging-1.1.jar;C:\software\axis2\lib\neethi-SNAPSHOT.jar;C:\software\axis2\lib\stax-1.2.0.jar;C:\software\
axis2\lib\axiom-impl-1.1.1.jar;C:\software\axis2\lib\xbean-2.2.0.jar; Client
Exception in thread "main" java.lang.ExceptionInInitializerError
at org.apache.axis2.userguide.xsd.EchoStringParamDocument$Factory.newInstance(EchoStringParamDocument.java:50)
at Client.echoString(Client.java:23)
at Client.main(Client.java:15)
Caused by: java.lang.RuntimeException: Cannot load SchemaTypeSystem. Unable to load class with name schemaorg_apache_xmlbeans.system.s0C55B8F5926
240E3576E190A4CD282A2.TypeSystemHolder. Make sure the generated binary files are on the classpath.
at org.apache.xmlbeans.XmlBeans.typeSystemForClassLoader(XmlBeans.java:783)
at org.apache.axis2.userguide.xsd.EchoStringParamDocument.<clinit>(EchoStringParamDocument.java:19)
... 3 more
Caused by: java.lang.ClassNotFoundException: schemaorg_apache_xmlbeans.system.s0C55B8F5926240E3576E190A4CD282A2.TypeSystemHolder
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at org.apache.xmlbeans.XmlBeans.typeSystemForClassLoader(XmlBeans.java:769)
... 4 more
What am I doing wrong ?
From: Yadav, Yogendra (IT)
Sent: Wednesday, October 04, 2006 1:13 PM
To: axis-user@ws.apache.org
Subject: problem with WSDL2Java generated code
I have
generated code using wsdl2java. Then I wrote a Client.java to call web
service, while excuting the client I get ClassNotFoundException in
LoginDocument.java class which is generated by wsdl2java
"schemaorg_apache_xmlbeans.system.s28FB12A440F78A928205C7E789D0196A.TypeSystemHolder"
C:\work\os-ag-onbank1\code>java -cp
build\classes;C:\software\axis2\lib\axis2-kernel-SNAPSHOT.jar;C:\software\axis2\lib\xbean-2.2.0.jar;.;C:\soft
ware\axis2\lib\axiom-api-1.1.1.jar;C:\software\axis2\lib\stax-api-1.0.1.jar;C:\software\axis2\lib\wsdl4j-1.6.1.jar;C:\software\axis2\lib\XmlSchem
a-SNAPSHOT.jar;C:\software\axis2\lib\commons-logging-1.1.jar;C:\software\axis2\lib\neethi-SNAPSHOT.jar;C:\software\axis2\lib\stax-1.2.0.jar;C:\so
ftware\axis2\lib\axiom-impl-1.1.1.jar;C:\software\axis2\lib\xbean-2.2.0.jar; Client
Exception in thread "main" java.lang.ExceptionInInitializerError
at com.example.www.onlinebanking.xsd.LoginDocument$Factory.newInstance(LoginDocument.java:112)
at Client.login(Client.java:40)
at Client.main(Client.java:17)
Caused by: java.lang.RuntimeException: Cannot load SchemaTypeSystem. Unable to load class with name schemaorg_apache_xmlbeans.system.s28FB12A440F
78A928205C7E789D0196A.TypeSystemHolder. Make sure the generated binary files are on the classpath.
at org.apache.xmlbeans.XmlBeans.typeSystemForClassLoader(XmlBeans.java:783)
at com.example.www.onlinebanking.xsd.LoginDocument.<clinit>(LoginDocument.java:19)
... 3 more
Caused by: java.lang.ClassNotFoundException: schemaorg_apache_xmlbeans.system.s28FB12A440F78A928205C7E789D0196A.TypeSystemHolder
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at org.apache.xmlbeans.XmlBeans.typeSystemForClassLoader(XmlBeans.java:769)
... 4 more
ware\axis2\lib\axiom-api-1.1.1.jar;C:\software\axis2\lib\stax-api-1.0.1.jar;C:\software\axis2\lib\wsdl4j-1.6.1.jar;C:\software\axis2\lib\XmlSchem
a-SNAPSHOT.jar;C:\software\axis2\lib\commons-logging-1.1.jar;C:\software\axis2\lib\neethi-SNAPSHOT.jar;C:\software\axis2\lib\stax-1.2.0.jar;C:\so
ftware\axis2\lib\axiom-impl-1.1.1.jar;C:\software\axis2\lib\xbean-2.2.0.jar; Client
Exception in thread "main" java.lang.ExceptionInInitializerError
at com.example.www.onlinebanking.xsd.LoginDocument$Factory.newInstance(LoginDocument.java:112)
at Client.login(Client.java:40)
at Client.main(Client.java:17)
Caused by: java.lang.RuntimeException: Cannot load SchemaTypeSystem. Unable to load class with name schemaorg_apache_xmlbeans.system.s28FB12A440F
78A928205C7E789D0196A.TypeSystemHolder. Make sure the generated binary files are on the classpath.
at org.apache.xmlbeans.XmlBeans.typeSystemForClassLoader(XmlBeans.java:783)
at com.example.www.onlinebanking.xsd.LoginDocument.<clinit>(LoginDocument.java:19)
... 3 more
Caused by: java.lang.ClassNotFoundException: schemaorg_apache_xmlbeans.system.s28FB12A440F78A928205C7E789D0196A.TypeSystemHolder
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at org.apache.xmlbeans.XmlBeans.typeSystemForClassLoader(XmlBeans.java:769)
... 4 more
any help will be
appreciated.
thanx
-yogen
NOTICE: If received in error, please destroy and notify sender. Sender does not intend to waive confidentiality or privilege. Use of this email is prohibited when received in error.
NOTICE: If received in error, please destroy and notify sender. Sender does not intend to waive confidentiality or privilege. Use of this email is prohibited when received in error.