Code generated from schema does not compile
-------------------------------------------

                 Key: JIBX-257
                 URL: http://jira.codehaus.org/browse/JIBX-257
             Project: JiBX
          Issue Type: Bug
          Components: core
    Affects Versions: JiBX 1.2
            Reporter: Nigel Charman
            Assignee: Dennis Sosnoski
             Fix For: JiBX 1.2
         Attachments: ant-compile.log

The default code generated from the schema at 
http://ws.genesisenergy.co.nz/fieldservices/ext/3.3/svreq_3_3.xsd does not 
compile. 

The generated code has duplicate variable names, for instance:
    private int tradesPersonOnSite = -1;
    private static final int TRADES_PERSON_ON_SITE_CHOICE = 0;
    private TradesPersonOnSite tradesPersonOnSite;

In this case, there is a top level element named TradesPersonOnSite and also an 
element named TradesPersonOnSite inside an <xsd:choice> element of a separate 
element.

The ant target used to generate the code is:
  <target name="codegen" depends="check-runtime">
    <echo message="Running code generation from schema"/>
    <delete quiet="true" dir="gen"/>
    <mkdir dir="gen"/>
    <java classname="org.jibx.schema.codegen.CodeGen" fork="yes"
        classpathref="classpath" failonerror="true">
      <arg value="-t"/>
      <arg value="gen/src"/>
      <arg value="-w"/>
      <arg value="../schema/svreq_3_3.xsd"/>
    </java>
  </target>

The compilation errors are attached.

[In my case, I've been able to work around these issues by ignoring the 
elements that weren't needed.]

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

------------------------------------------------------------------------------
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
_______________________________________________
jibx-devs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jibx-devs

Reply via email to