Question

I want to create a java classes from the xsd using xjc ant task. Most of it works ok. I need it not to go through and because it already has mapping done. Here is 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 imports and creates binding classes. But I already have those. So how to inform xjc to use already created bindings in the classpath? For xades implementation I'll use xades4j library

Thanks,

Vidmantas

Was it helpful?
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top