i try add superclass definition generated class based on incoming xml complextype. when make mapping generic, this, works:
<jaxb:globalbindings generateelementproperty="false"> <xjc:superclass name="nl.ilent.bpo.interceptor.hashable" /> </jaxb:globalbindings>
now want 1 type subclass class. tried many selectors, 1 finds 1 type:
<jaxb:bindings schemalocation="../xsd/organisatietypes.xsd" node="//xs:complextype[@name='datumincompleettype']"> <xjc:superclass name="nl.ilent.bpo.interceptor.hashable" /> </jaxb:bindings>
even though many alternatives gave "0 nodes" result, , 1 not, generated class not subclass hashable. doing wrong?
this xsd defining complextype in ../xsd/organisatietypes.xsd:
<xsd:complextype name="datumincompleettype"> <xsd:choice minoccurs="0"> <xsd:element name="datum" type="xsd:date"/> <xsd:element name="jaarmaand" type="xsd:gyearmonth"/> <xsd:element name="jaar" type="xsd:gyear"/> </xsd:choice> </xsd:complextype>
we using cxf 2.7.18
try way
<jaxb:bindings schemalocation="../xsd/organisatietypes.xsd" node="/xs:schema"> <jaxb:bindings> <jaxb:bindings node="//xs:complextype[@name='datumincompleettype']"> <xjc:superclass name="nl.ilent.bpo.interceptor.hashable" /> </jaxb:bindings> </jaxb:bindings> </jaxb:bindings>
edit
ok, sorry, won't work: according https://docs.oracle.com/cd/e17802_01/webservices/webservices/docs/2.0/jaxb/vendorcustomizations.html#superclass possible global bindings, i.e. generated classes, not single generated classes
Comments
Post a Comment