users@jaxb.java.net

Re: xjc and element already defined

From: Wolfgang Laun <wolfgang.laun_at_gmail.com>
Date: Thu, 2 Oct 2014 17:21:09 +0200

The calls you've posted aren't correct. A single call naming the bindings
file is required:
   xjc -b binding_referencia.xjb CFEType_v1.30.xsd

If you want to use local copies, you have to adapt the URLs. In
xenc-schema.xsd:

  <import namespace='http://www.w3.org/2000/09/xmldsig#'
          schemaLocation='xmldsig-core-schema.xsd'/>

After commenting out the DTDs, all classes were compiled.

-W


On 2 October 2014 16:38, rodriguez <rodriguez_at_ort.edu.uy> wrote:

> i try to generate java classes with xjc.
> then error is element CryptoBinary already defined.
> I dont know how to generate classes.
>
> jaxb-ri-2.2.7\bin\xjc.bat -no-header -encoding UTF-8 -classpath
> jaxb-ri-2.2.7\lib\jaxb-api.jar;jaxb-ri-2.2.7\lib\jaxb-
> impl.jar;jaxb-ri-2.2.7\lib\jaxb-core.jar; -d salida -p
> clase.efactura.xml.sobre xmldsig-core-schema.xsd
> jaxb-ri-2.2.7\bin\xjc.bat -no-header -encoding UTF-8 -classpath
> jaxb-ri-2.2.7\lib\jaxb-api.jar;jaxb-ri-2.2.7\lib\jaxb-
> impl.jar;jaxb-ri-2.2.7\lib\jaxb-core.jar; -d salida -p
> clase.efactura.xml.sobre CFEType_v1.30.xsd
>
>
> thanks
> Fernando Rodriguez.
>
>
>
>
>
>