Hi Iksrazal,
This was a known issue. I think Ajith once wrote a small ant script to
copy the generated stuff to correct places and generate a jar file.
Anyway, since this is a well know problem and a solution, can you
please open a JIRA on this and close it giving your solution. This will
be useful for tracking purposes.
And one other thing, seems like you are using the data binding stuff a
lot. So if you can write a small article on, using Axis2 data binding,
from your experience, I'm happy to host that in Axis2 web site itself.
I think others also can help you with that. This will be useful for all
the new comers to Axis2 and its a good time for you to give something
back to the community :-)
Hope you don't have any intellectual property problems with the company
in doing that. ;-)
Chinthaka
iksrazal wrote:
In case anyone gets this same error, here is how I solved it:
Buried in all those .xsb files, the WSDL2Java command creates a compiled
class, like so:
schemaorg_apache_xmlbeans/system/sA83263C4583E5B147EF2C07FFFC6DFF2/TypeSystemHolder.class
That class needs to be in the classpath used to compile the java source files
which WSDL2Java produced. Here's how the relevant parts of my build.xml
turned out:
<path id="axis.classpath">
<pathelement location="build/classes" />
<fileset dir="${axis.home}/lib">
<include name="**/*.jar" />
</fileset>
<fileset dir="lib">
<include name="*.jar"/>
</fileset>
<pathelement location="${build.classes}" />
</path>
<target name="compile_wsdl2" depends="wsdl2">
<echo message="Compiling wsdl2 files"/>
<javac
srcdir="wise"
destdir="${build.classes}"
deprecation="true"
failonerror="true" debug="true"
>
<include name="**/*.java"/>
<classpath refid="axis.classpath"/>
</javac>
<copy todir="${build.classes}" >
<fileset dir="wise" >
<include name="**/*.properties"/>
<!-- any XML/XSL file -->
<include name="**/*.x*"/>
</fileset>
</copy>
</target>
<!-- ./WSDL2Java.sh -uri wsdl/service.wsdl -ss -sd -o wise/ -p
com.siemens.swa.plugins.webservices.types -->
<target name="wsdl2" depends="clean,prepare">
<java classname="org.apache.axis2.wsdl.WSDL2Java" fork="true">
<classpath refid="axis.classpath"/>
<arg value="-uri"/>
<arg file="wsdl/service.wsdl"/>
<arg value="-ss"/>
<arg value="-sd"/>
<arg value="-o"/>
<arg file="wise"/>
<arg value="-p"/>
<arg value="com.siemens.swa.plugins.webservices.types"/>
</java>
<!-- Move the schema folder to classpath-->
<move todir="${build.classes}">
<fileset dir="wise">
<include name="**/*schema*/**/*.class"/>
<include name="**/*schema*/**/*.xsb"/>
</fileset>
</move>
</target>
iksrazal
Em Sexta 25 Novembro 2005 09:00, escreveu:
Hi all,
I 'm getting strange errors when trying to compile my WSDL2Java code with
ant:
./WSDL2Java.sh -uri wsdl/service.wsdl -ss -sd -o wise/ -p
com.siemens.swa.plugins.webservices.types
[javac]
/home/iksrazal/white3/wise/com/siemens/swa/plugins/webservices/types/databi
nding/org/xmlsoap/schemas/TimeDocument.java:19: package
schemaorg_apache_xmlbeans.system.sECC7940C4012EB2293D5238A794D458D.TypeSyst
emHolder does not exist
[javac] public static final org.apache.xmlbeans.SchemaType type =
(org.apache.xmlbeans.SchemaType)schemaorg_apache_xmlbeans.system.sECC7940C4
012EB2293D5238A794D458D.TypeSystemHolder.typeSystem.resolveHandle("timea4a3d
octype");
I think what I need to do is put the
'schemaorg_apache_xml' dir generated by WSDL2Java in the classpath. After
several attempts, however, I'm not having any luck.
My classpath is:
<path id="axis.classpath">
<pathelement location="build/classes" />
<fileset dir="${axis.home}/lib">
<include name="**/*.jar" />
</fileset>
<fileset dir="lib">
<include name="*.jar"/>
</fileset>
<pathelement location="wise/schemaorg_apache_xml" />
</path>
<taskdef resource="axis-tasks.properties"
classpathref="axis.classpath" />
My target is:
<target name="compile_wsdl2" depends="clean,prepare">
<echo message="Compiling wsdl2 files"/>
<javac
srcdir="wise"
destdir="${build}"
deprecation="true"
failonerror="true" debug="true"
<include name="**/*.java"/>
<classpath refid="axis.classpath"/>
</javac>
<copy todir="${build}" >
<fileset dir="wise" >
<include name="**/*.properties"/>
<include name="**/*.x*"/>
</fileset>
</copy>
</target>
Please help,
iksrazal
|
- Re: [axis2] "TypeSystemHolder does not exist" hel... Eran Chinthaka
-