On Wednesday 22 November 2006 17:16, Ryan Moquin wrote:
> I have a quick question.. it's driving me nuts that I can't get a
> webservice to generate for xmlbeans.  It's said that when you get a
> NullPointerException it's because your XMLBeans aren't on the classpath. 
> In my client library, using either the Antrun plugin or the Maven2 XFire
> plugin, I get a NPE no matter how I include my XMLBeans on the classpath.
> Right now, they are being loaded as an external project dependency.  Should
> this work?
>
> Does anyone have an example how they include their XMLBeans on the
> classpath so that XFire will pick it up when generating classes?
>
> Thanks!


Hi,
I am using this build.xml file that generates the xmlbeans from the xsd files 
and also runs the wsgen to generate the xfire artifacts from the wsdl files.

I think that with some simple modifications you should be able to make it work 
in your project.

Let me know if you need more help.
            Manuel Valladares



<project name="xota-xfire" default="xf2j" >
  <property name="xfire.home" location="/usr/local/xfire-1.2.2"/>
  <property name="xmlbeans.home" location="/usr/local/xmlbeans-2.2.0" />

  <path id="xmlbeans.classpath">
    <fileset dir="${xmlbeans.home}/lib">
      <include name="**/*.jar" />
    </fileset>
  </path>

  <target name="xb2j">
    <taskdef name="xmlbean" classname="org.apache.xmlbeans.impl.tool.XMLBean" 
classpathref="xmlbeans.classpath" />

    <xmlbean classpathref="xmlbeans.classpath" classgendir="classes" 
failonerror="true" srcgendir="src" memoryMaximumSize="256m">
      <fileset dir="xsd" includes="*RQ.xsd"/>
    </xmlbean>

    <jar basedir="classes" destfile="xmlbeantypes.jar">
    </jar>
  </target>

  <path id="xfire.classpath">
    <fileset dir="${xfire.home}/lib">
      <include name="**/*.jar" />
    </fileset>
    <fileset dir="${xfire.home}">
      <include name="xfire-all-1.2.2.jar" />
    </fileset>
    <fileset dir=".">
      <include name="xmlbeantypes.jar" />
    </fileset>
  </path>

  <target name="xf2j" depends="xb2j">
    <taskdef name="wsgen" classname="org.codehaus.xfire.gen.WsGenTask" 
classpathref="xfire.classpath"/>
    <wsgen outputDirectory="outputXFire" wsdl="OTA_Cancel.wsdl" 
package="mirai" binding="xmlbeans" overwrite="true"/>
  </target>
</project>

---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email

Reply via email to