Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Minor
-
Resolution: Won't Fix
-
Affects Version/s: None
-
Fix Version/s: 1.0.3
-
Component/s: XML code generator
-
Labels:None
-
Environment:Windows XP
-
Number of attachments :
Description
Attached is a zip file with the Main schema OrderNotice.xsd for which i am running CastorSourceGen and the also included are the referenced XSD's. when i execute the following command:
java org.exolab.castor.builder.SourceGenerator -f -types j2 -i "C:/v7/Atlas/jms/Public/OrderNotice.xsd" -package com.cingular -dest C:/9.2 -generateImportedSchemas true
the castor classes generated. when compiling the java code generated,I am having issues with the import statements for types in the following java files.
OrderInfo and OrderInfoDescriptor.java
SublineInfo and SublineInfoDescriptor.java
EmailInfo and EmainInfoDescriptor.java
TaxResultsInfo and TaxResultsInfoDescriptor.java
All the above are elements from the Compass.xsd and are defined as complex types in the XSD.
Eg: OrderInfo.java has import statement "import types.StatusInfo; " where as it should actually have been "import com.cingular. types.StatusInfo;"
OrderInfoDescriptor.java , doesnt import statement at all for types.StatusInfo but is using it.
I am also attaching the castorbuilder.properties file i used when executing the SourceGen. I have the following jars in the classpath when executing the sourcegenerator:
SET CLASSPATH=%TPCL%/commons-logging.jar;%TPCL%/xml-apis.jar;%TPCL%/xercesImpl.jar;%TPCL%/castor-0.9.6.jar;%TPCL%/xalan.jar;%TPCL%/castor-0.9.6-xml.jar
Sorry ,i am not able to generate a simple xml to replicate the issue and hence attaching the original XSD's which are complex as it is . I hope you could let me know whats causing the issue. I tired using the castor 1.0.2 jars to see if i can get any different behavior, but with those jars i am not able to execute Sourcegen command at all, i get the following error:
Exception in thread "main" java.lang.NoSuchMethodError
at org.exolab.castor.builder.DescriptorSourceFactory.createSource(Descri
ptorSourceFactory.java:142)
at org.exolab.castor.builder.SourceGenerator.processJClass(SourceGenerat
or.java:1392)
at org.exolab.castor.builder.SourceGenerator.processSimpleType(SourceGen
erator.java:1238)
at org.exolab.castor.builder.SourceGenerator.createClasses(SourceGenerat
or.java:1064)
at org.exolab.castor.builder.SourceGenerator.createClasses(SourceGenerat
or.java:939)
at org.exolab.castor.builder.SourceGenerator.createClasses(SourceGenerat
or.java:925)
at org.exolab.castor.builder.SourceGenerator.createClasses(SourceGenerat
or.java:925)
at org.exolab.castor.builder.SourceGenerator.generateSource(SourceGenera
tor.java:361)
at org.exolab.castor.builder.SourceGenerator.generateSource(SourceGenera
tor.java:443)
at org.exolab.castor.builder.SourceGenerator.generateSource(SourceGenera
tor.java:476)
at org.exolab.castor.builder.SourceGenerator.main(SourceGenerator.java:8
73)
Can you please attach the base class com.cingular.NoticeContainer as well (and all relevant files required to build this successfully) ?