Reputation: 11
How to generate .XJC file or jaxb customization file ?
Goggled but could not find any tool. Tried with XML Spy but could not Thanks in advance
Upvotes: 1
Views: 265
Reputation: 8272
This is an xjb example ..
<bindings version="2.0" xmlns="http://java.sun.com/xml/ns/jaxb"
xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xjc="http://java.sun.com/xml/ns/jaxb/xjc"
xmlns:annox="http://annox.dev.java.net">
<bindings schemaLocation="../your.xsd">
<bindings node="//xs:complexType[@name='YourType']">
<annox:annotate>
<annox:annotate annox:class="javax.xml.bind.annotation.XmlRootElement"
name="YourType" namespace="http://name.space.xsd">
</annox:annotate>
</annox:annotate>
</bindings>
<bindings node="//xsd:complexType[@name='User']//xsd:sequence//xsd:element[@name='certificate']">
<xjc:javaType name="java.security.cert.X509Certificate" adapter="adapters.X509CertificateAdapter" />
</bindings>
</bindings>
</bindings>
Upvotes: 1