You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by "trebor iksrazal (JIRA)" <ji...@apache.org> on 2005/11/28 13:15:38 UTC
[jira] Commented: (AXIS2-313) "TypeSystemHolder does not exist" compile errors from WSDL2Java
[ http://issues.apache.org/jira/browse/AXIS2-313?page=comments#action_12358646 ]
trebor iksrazal commented on AXIS2-313:
---------------------------------------
Here's the solution:
WSDL2Java creates at least one compiled class in schemaorg_apache_xmlbeans :
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="jar_wsdl" depends="compile_wsdl2">
<jar jarfile="lib/swa_wsdl.jar" >
<fileset dir="${build}/classes" />
</jar>
</target>
<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"/>
<!-- qualquer XML/XSL arquivo -->
<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>
> "TypeSystemHolder does not exist" compile errors from WSDL2Java
> ---------------------------------------------------------------
>
> Key: AXIS2-313
> URL: http://issues.apache.org/jira/browse/AXIS2-313
> Project: Apache Axis 2.0 (Axis2)
> Type: Bug
> Reporter: trebor iksrazal
>
> The WSDL2Java tool that comes with Axis2 produces code which does not compile easily. Per the axis user list I was asked by Eran Chinthaka to produce a JIRA issue that describes the problem and solution:
> "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."
> The heart of the matter is that the java source files produced from WSDL2Java contain references such as:
> public static final org.apache.xmlbeans.SchemaType type = (org.apache.xmlbeans.SchemaType)schemaorg_apache_xmlbeans.system.sC4E9AB45BD3F86168AEED3EE91073B40.TypeSystemHolder.typeSystem.resolveHandle("timea4a3doctype");
> This reference is _not_ contained in the source code produced by Axis2 WSDL2Java, and does not compile easily as one would normally expect.
> /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/databinding/org/xmlsoap/schemas/TimeDocument.java:19:
> package
> schemaorg_apache_xmlbeans.system.sECC7940C4012EB2293D5238A794D458D.TypeSystemHolder
> does not exist
> [javac] public static final org.apache.xmlbeans.SchemaType type =
> (org.apache.xmlbeans.SchemaType)schemaorg_apache_xmlbeans.system.sECC7940C4012EB2293D5238A794D458D.TypeSystemHolder.typeSystem.resolveHandle("timea4a3doctype");
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira