Hi Jonathan,

It looks like a bug, the multiple "any" elements seem to be causing a
problem.
Hopefully Arnaud can look into it for you when he has a chance. Feel
free to fill out a bug report in our bugzilla
(http://bugzilla.exolab.org) if you wish to track this issue.

Thanks,

--Keith

Jonathan Gray wrote:
> 
> After changing the namespace on the attached answers_orig.xsd to
> http://www.w3.org/2001/XMLSchema, I got the below exception from Castor XML
> SourceGenerator (see below).  The answers_orig.xsd schema was automatically
> generated from answers.xdr (MS format) so I commented out some stuff to
> produce answers.xsd which I think does almost exactly the same thing as the
> original XDR specification.
> 
> Should Castor support the answers_orig.xsd?
> 
> I would, of course, like the process of XDR -> XSD -> Java to be as
> automated as possible so it would be excellent if Castor supported this kind
> of schema.
> 
> Can anyone help?
> 
> D:\tmp\binding\castor-0.9.3.9>java -cp
> castor-0.9.3.9-xml.jar;d:\myprojects\tfr-hac\development\java\lib\xerces.jar
> org.
> exolab.castor.builder.SourceGenerator -i ..\answers_orig.xsd -package
> com.tfr.itv.ctc
> Exception in thread "main" java.lang.IllegalArgumentException: duplicate
> name found: _anyObject
>         at org.exolab.javasource.JClass.addField(JClass.java:242)
>         at
> org.exolab.castor.builder.FieldInfo.createJavaField(FieldInfo.java:155)
>         at
> org.exolab.castor.builder.SourceFactory.handleField(SourceFactory.java:1385)
>         at
> org.exolab.castor.builder.SourceFactory.processContentModel(SourceFactory.ja
> va:1541)
>         at
> org.exolab.castor.builder.SourceFactory.createSourceCode(SourceFactory.java:
> 677)
>         at
> org.exolab.castor.builder.SourceGenerator.createClasses(SourceGenerator.java
> :914)
>         at
> org.exolab.castor.builder.SourceGenerator.processContentModel(SourceGenerato
> r.java:896)
>         at
> org.exolab.castor.builder.SourceGenerator.processContentModel(SourceGenerato
> r.java:891)
>         at
> org.exolab.castor.builder.SourceGenerator.processComplexType(SourceGenerator
> .java:807)
>         at
> org.exolab.castor.builder.SourceGenerator.createClasses(SourceGenerator.java
> :758)
>         at
> org.exolab.castor.builder.SourceGenerator.createClasses(SourceGenerator.java
> :707)
>         at
> org.exolab.castor.builder.SourceGenerator.generateSource(SourceGenerator.jav
> a:354)
>         at
> org.exolab.castor.builder.SourceGenerator.generateSource(SourceGenerator.jav
> a:412)
>         at
> org.exolab.castor.builder.SourceGenerator.generateSource(SourceGenerator.jav
> a:441)
>         at
> org.exolab.castor.builder.SourceGenerator.main(SourceGenerator.java:665)
> 
>   ------------------------------------------------------------------------
> 
>    answers_orig.xsdName: answers_orig.xsd
>                    Type: unspecified type (application/octet-stream)
> 
>    answers.xsdName: answers.xsd
>               Type: unspecified type (application/octet-stream)
> 
>    answers.xdrName: answers.xdr
>               Type: unspecified type (application/octet-stream)

----------------------------------------------------------- 
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
        unsubscribe castor-dev

Reply via email to