fair play rob. this sorted out my problem. thanks.
robert lazarski wrote:
Yeah, there is a trick here that's explained in the code generation
guide ant task section.
http://ws.apache.org/axis2/0_95/CodegenToolReference.html
Add '-d' to the wsdl2java ant task - the docs need to be updated - so
that it looks like:
<target name="wsdl2java" depends="clean,prepare">
<delete dir="output" />
<java classname="org.apache.axis2.wsdl.WSDL2Java" fork="true">
<classpath refid="axis.classpath"/>
<arg value="-d"/>
<arg value="xmlbeans"/>
<arg value="-uri"/>
<arg file="wsdl/simple.wsdl"/>
<arg value="-ss"/>
<arg value="-g"/>
<arg value="-sd"/>
<arg value="-o"/>
<arg file="output"/>
<arg value="-p"/>
<arg value="org.simple.endpoint"/>
</java>
<!-- Move the schema folder to classpath-->
<move todir="${build.classes}">
<fileset dir="output/resources">
<include name="*schema*/**/*.class"/>
<include name="*schema*/**/*.xsb"/>
</fileset>
</move>
</target>
Now the trick is that a feature of xmlbeans is that it generates a
single class - which needs to be referenced . See the 'move todir'
part of the task I pasted.
And that should do it. If you're still let us know.
HTH,
Robert
http://www.braziloutsource.com
On 4/24/06, *Cleve OpenSource* <[EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]>> wrote:
I'm having a really weird problem that i'm sure there is a simple
fix for.
Using Axis 1, everything is easy.
1) I have a WSDL file with the not too complex types section
2) I generate my classes from the WSDL file
3) deploy to a server and have a client stub connect through and test
the web service.
Using Axis2, everything is supposed to be easy, but is not. i must be
stupid.
I keep having the same problem that Ken Campbell reports on
3/4/2006 @
14:45. No answers were posted to the group.
http://mail-archives.apache.org/mod_mbox/ws-axis-user/200604.mbox/[EMAIL
PROTECTED]
<http://mail-archives.apache.org/mod_mbox/ws-axis-user/200604.mbox/[EMAIL
PROTECTED]>
ClassPath problems for XMLBeans. What is strange, is that a simple
google search finds people asking the question but with no discernible
answers coming back.
Has anyone run into this problem?
Cheers,
Cleve
_____________________________________________
java.lang.reflect.InvocationTargetException
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 :585)
at
org.apache.axis2.XjmiBookingTest.getTestObject(XjmiBookingTest.java:261)
at
org.apache.axis2.XjmiBookingTest.testping(XjmiBookingTest.java:200)
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:585)
at junit.framework.TestCase.runTest(TestCase.java:164)
at junit.framework.TestCase.runBare(TestCase.java:130)
at junit.framework.TestResult$1.protect(TestResult.java:110)
at junit.framework.TestResult.runProtected (TestResult.java:128)
at junit.framework.TestResult.run(TestResult.java:113)
at junit.framework.TestCase.run(TestCase.java:120)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java
:478)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:344)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
Caused by: java.lang.ExceptionInInitializerError
at
uk.co.groundtransport.xjmi.xjmi.wsdl.booking.PingDocument$Factory.newInstance(PingDocument.java:45)
... 19 more
Caused by: java.lang.RuntimeException: Cannot load SchemaTypeSystem.
Unable to load class with name
schemaorg_apache_xmlbeans.system.s6BC58055D4FA32B2157A35DE55719CF0.TypeSystemHolder.
Make sure the generated binary files are on the classpath.
at
org.apache.xmlbeans.XmlBeans.typeSystemForClassLoader(XmlBeans.java
:781)
at
uk.co.groundtransport.xjmi.xjmi.wsdl.booking.PingDocument.<clinit>(PingDocument.java:20)
... 20 more
Caused by: java.lang.ClassNotFoundException:
schemaorg_apache_xmlbeans.system.s6BC58055D4FA32B2157A35DE55719CF0.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:767)
... 21 more