I want to create java classes from xsd using the xjc ant task. Most of them work fine. I need him to fail, because he has already done the mapping. Here is the xsd:
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema targetNamespace="urn:oasis:names:tc:opendocument:xmlns:digitalsignature:1.0"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:dsig="urn:oasis:names:tc:opendocument:xmlns:digitalsignature:1.0"
xmlns:xmldsig="http://www.w3.org/2000/09/xmldsig#"
xmlns:xades="http://uri.etsi.org/01903/v1.3.2#"
elementFormDefault="qualified"
>
<xs:import namespace="http://www.w3.org/2000/09/xmldsig#"
schemaLocation="http://www.w3.org/TR/2002/REC-xmldsig-core-20020212/xmldsig-core-schema.xsd" />
<xs:import namespace="http://uri.etsi.org/01903/v1.3.2#"
schemaLocation="http://uri.etsi.org/01903/v1.3.2/XAdES.xsd" />
<xs:import namespace="http://uri.etsi.org/01903/v1.4.1#"
schemaLocation="http://uri.etsi.org/01903/v1.4.1/XAdESv141.xsd" />
<xs:element name="document-signatures">
<xs:complexType>
<xs:sequence minOccurs="1" maxOccurs="unbounded">
<xs:element ref="xmldsig:Signature" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
xjc goes through all the imports and creates related classes. But I already have one. So how do you tell xjc to use already created bindings in the classpath? To implement xades, I will use the xades4j library
Thank,
Vidmantas
source
share