axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "robert lazarski" <robertlazar...@gmail.com>
Subject Re: [Axis2 1.0] ant codegen target problems
Date Sat, 06 May 2006 13:27:55 GMT
There's some known problems AntCodegenTask. In the meantime, what I use is:

 <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>

HTH,
Robert
http://news.google.com/

On 5/6/06, Rob Henley <rob.henley@freeuk.com> wrote:
>
> 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
> Rob
>

Mime
View raw message