Dennis,

Sorry for the delay.  I finally had a chance to try this and it
does now appear to work in the 1_2_2_SNAPSHOT.  Thank you!  When
will this become an official release?

Also, on a related note, the QB schemas use a lot of unqualified
references (i.e. they do not define the includes for elements
that are in the same default namespace).  For example the
qbxmlops70.xsd contains:

<xsd:element name="SubscriberID" type="GUIDTYPE"/>

This references the GUIDTYPE defined in qbxmltypes70.xsd as:

<xsd:element name="SubscriberID" type="GUIDTYPE"/>

Both xsd files are defined to be in the same default namespace,
xmlns:xsd="http://www.w3.org/2001/XMLSchema";.

However, the original files from QB do NOT include any
xsd:include statements to make the above reference explicit. 
Unless I add the below <xsd:include> statements to explicitly
define all of these references, then the codegen operation fails.
 I needed to add:

<xsd:include schemaLocation="qbxmltypes70.xsd"/>
<xsd:include schemaLocation="qbxml70.xsd"/>
<xsd:include schemaLocation="qbxmlso70.xsd"/>

When I compile the same schemas with XMLBeans, I do not need to
add the <xsd:include> statements.  I understand that it is
'clearer' with them added, but these are Intuit provided schemas
that I do not feel comfortable changing in any way.

Should this work (without the includes I manually added) in
codegen as all are in the same namespace? If not, why does this
work for other tools?

TIA!

---------Original Message---------

Should be working with the 1.2.2 code - I tried this out over the
weekend.

  - Dennis


jibx-us...@abilsoft.com wrote:
>
> Hello,
>
> I'm not sure if this is another variant of JIBX-263, or a
completely 
> separate problem???  However, when I run CodeGen on Intuit's 
> QuickBooks schemas, I get the following stack trace and the
operation 
> fails.
>
>      [java] Exception in thread "main"
java.lang.IllegalArgumentException
>      [java]     at 
>
org.eclipse.jdt.core.dom.SimpleName.setIdentifier(SimpleName.java:196)
>      [java]     at 
> org.eclipse.jdt.core.dom.AST.newSimpleName(AST.java:1251)
>      [java]     at 
>
org.jibx.schema.codegen.ClassBuilder.addEnumConstant(ClassBuilder.java:351)
>      [java]     at 
>
org.jibx.schema.codegen.EnumerationClassHolder.buildJava5Enumeration(EnumerationClassHolder.java:353)
>      [java]     at 
>
org.jibx.schema.codegen.EnumerationClassHolder.generate(EnumerationClassHolder.java:162)
>      [java]     at 
>
org.jibx.schema.codegen.ClassHolder.generateInner(ClassHolder.java:702)
>      [java]     at 
>
org.jibx.schema.codegen.StructureClassHolder.generate(StructureClassHolder.java:2026)
>      [java]     at 
>
org.jibx.schema.codegen.PackageHolder.generate(PackageHolder.java:203)
>      [java]     at 
>
org.jibx.schema.codegen.PackageHolder.generate(PackageHolder.java:218)
>      [java]     at 
> org.jibx.schema.codegen.CodeGen.generate(CodeGen.java:1402)
>      [java]     at
org.jibx.schema.codegen.CodeGen.main(CodeGen.java:1652)
>
> Here is the ant invocation I am using....
>
>     <target name="qbXML" depends="prepare"
description="Generates Code 
> for qbXML requests">
>         <path id="codegen_classpath">
>             <fileset dir="${JIBX_HOME}/lib" includes="*.jar" />
>             <pathelement location="bin" />
>         </path>
>
>         <java classname="org.jibx.schema.codegen.CodeGen"
fork="yes"
>                 classpathref="codegen_classpath"
failonerror="true">
>             <arg value="-n"/>
>             <arg value="com.foo.bar"/>
>             <arg value="-s"/>
>             <arg value="${srcDir}/xsd"/>
>             <arg value="-t"/>
>             <arg value="${srcDir}/generated/${srcDir}"/>
>             <arg value="-v"/>
>             <arg value="qbxmlops70.xsd"/>
>         </java>
>     </target>
>
> I am using JiBX 1_2_1.
>
> line 18 of the qbxmlops70.xsd includes the qbxml70.xsd file. 
>
>  
>
> <xsd:include schemaLocation="qbxml70.xsd"/>
>
>  
>
> The stack trace seems to stem from around line 1446 of the
included 
> qbxml70.xsd file which defines the GeneralSummaryReportType as a 
> restricted SimpleType made of an enumeration. 
>
>  
>
> <xsd:element name="GeneralSummaryReportType">
>
>             <xsd:simpleType>
>
>                         <xsd:restriction base="ENUMTYPE">
>
>                                     <xsd:enumeration 
> value="BalanceSheetPrevYearComp"/>
>
>                                     <xsd:enumeration 
> value="BalanceSheetStandard"/>
>
>                                     <xsd:enumeration 
> value="BalanceSheetSummary"/>
>
>                                     <xsd:enumeration 
> value="CustomerBalanceSummary"/>
>
>                                     <xsd:enumeration 
> value="ExpenseByVendorSummary"/>
>
>                                     <xsd:enumeration 
> value="IncomeByCustomerSummary"/>
>
>                                     <xsd:enumeration 
> value="InventoryStockStatusByItem"/>
>
>                                     <xsd:enumeration 
> value="InventoryStockStatusByVendor"/>
>
>                                     <xsd:enumeration 
> value="IncomeTaxSummary"/>
>
>                                     <xsd:enumeration 
> value="InventoryValuationSummary"/>
>
>                                     <xsd:enumeration 
> value="PhysicalInventoryWorksheet"/>
>
>                                     <xsd:enumeration 
> value="ProfitAndLossByClass"/>
>
>                                     <xsd:enumeration 
> value="ProfitAndLossByJob"/>
>
>                                     <xsd:enumeration 
> value="ProfitAndLossPrevYearComp"/>
>
>                                     <xsd:enumeration 
> value="ProfitAndLossStandard"/>
>
>                                     <xsd:enumeration 
> value="ProfitAndLossYTDComp"/>
>
>                                     <xsd:enumeration 
> value="PurchaseByItemSummary"/>
>
>                                     <xsd:enumeration 
> value="PurchaseByVendorSummary"/>
>
>                                     <xsd:enumeration 
> value="SalesByCustomerSummary"/>
>
>                                     <xsd:enumeration 
> value="SalesByItemSummary"/>
>
>                                     <xsd:enumeration 
> value="SalesByRepSummary"/>
>
>                                     <xsd:enumeration 
> value="SalesTaxLiability"/>
>
>                                     <xsd:enumeration 
> value="SalesTaxRevenueSummary"/>
>
>                                     <xsd:enumeration 
> value="TrialBalance"/>
>
>                                     <xsd:enumeration 
> value="VendorBalanceSummary"/>
>
>                         </xsd:restriction>
>
>             </xsd:simpleType>
>
> </xsd:element>
>
>  
>
> Note that ENUMTYPE restriction is defined in the qbxmltypes70.xsd 
> included by qbxml70.xsd on line 17.  qbxmltypes70.xsd defines
ENUMTYPE as
>
>  
>
> <xsd:simpleType name="ENUMTYPE">
>
>   <xsd:restriction base="xsd:string">
>
>   </xsd:restriction>
>
> </xsd:simpleType>
>
>  
>
> I will happily forward the entire XSDs if needed, but they are
a bit 
> large.
>
>  
>
> Unfortunately, as these XSDs are defined by Intuit, I cannot
change them.
>
>  
>
> I have had significant previous positive experience with JiBX,
so this 
> comes somewhat as a surprise to me.  Therefore, only as a data
point 
> to rule out structural problems with the QuickBooks schemas; I
offer 
> that the same xsds complete without errors when using
XML-BEANS.  I 
> would, of course, prefer to stick with JIBX if this can be
resolved or 
> worked around, however, this is presently a show stopper for us.
>
> Any and all help will be greatly appreciated!
>
> Thanks in advance for your help!
>
> Todd
>
>
------------------------------------------------------------------------
>
>
------------------------------------------------------------------------------
> Come build with us! The BlackBerry(R) Developer Conference in
SF, CA
> is the only developer event you need to attend this year.
Jumpstart your
> developing skills, take BlackBerry mobile applications to
market and stay 
> ahead of the curve. Join us from November 9 - 12, 2009.
Register now!
> http://p.sf.net/sfu/devconference
>
------------------------------------------------------------------------
>
> _______________________________________________
> jibx-users mailing list
> jibx-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/jibx-users
>   

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year.
Jumpstart your
developing skills, take BlackBerry mobile applications to market
and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
jibx-users mailing list
jibx-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jibx-users



------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
jibx-users mailing list
jibx-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jibx-users

Reply via email to