My build.xml contains
<target
name="axis-init">
<taskdef
name="codegen"
classname="org.apache.axis2.tool.ant.AntCodegenTask"
classpath="${axis.dist.classpath}"/>
</target>
<target name="wsdl2java"
depends="axis-init">
<codegen
wsdlfilename="my.wsdl"
language="java"
synconly="true"
serverside="true"
generateservicexml="true">
</codegen>
</target>
where axis.dist.classpath contains all the jars
in the axis2 lib directory.
Running 'ant wsdl2java' I get an error
"javax.xml.stream.FactoryConfigurationError:
Provider com.bea.xml.stream.MXParserFactory not found".
Via google I managed to find a couple of
additional jars to supply missing classes: jsr173_1.0_ri.jar and
jsr173_1.0_api.jar. Adding these to my global classpath fixes the
problem.
Question 1. Are the above jsr173 jars missing
from the 1.0 distribution?
Question 2. Is there a more ant-like way to
control the classpath used when the codegen tool runs? I tried the following
...
<codegen
wsdlfilename="purchasing1.wsdl"
language="java"
synconly="true"
serverside="true"
generateservicexml="true">
<classpath
refid="axis.dist.classpath"/>
</codegen>
but that gives me a
java.lang.ExceptionInInitializerError.
Question 3. I'd like to be able to specify the
xmlbeans data binding. What is the AntCodegenTask equivalent to the command
line "--databinding-method xmlbeans"? This doesn't seem to be documented. I
guessed it might be databindingname="xmlbeans", but when I add this to the codegen target
I get the error "java.lang.RuntimeException:
java.lang.reflect.InvocationTargetException".
Many thanks