开发者

How to access jaxb:class element

开发者 https://www.devze.com 2023-04-05 07:57 出处:网络
How do I get the jaxb:class element to show? I currently have the following xsd: <xs:schema xmlns:xs=\"http://www.w3.org/2001/XMLSchema\"

How do I get the jaxb:class element to show? I currently have the following xsd:

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
    xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
    xmlns:xjc="http://java.sun.com/xml/ns/jaxb/xjc"
    jaxb:version="2.0" jaxb:extensionBindingPrefixes="xjc"
    elementFormDefault="qualified" targetNamespace="***"
    xmlns:common="***">

    <xs:com开发者_JAVA技巧plexType name="IdentifiableDTO" abstract="true">
        <xs:annotation>
            <xs:appinfo></xs:appinfo>
        </xs:annotation>
        <xs:attribute name="id" type="common:uuid" />
    </xs:complexType>
</xs:schema>

But the only elements I can access within the xs:appinfo is jaxb:globalBindings and jaxb:javaType. I need to specify the jaxb:class so I can add some custom behaviour.


What is exactly the problem with:

<xs:complexType name="IdentifiableDTO">
    <xs:annotation>
        <xs:appinfo>
            <jaxb:class name="MySpecificIdentifiableDTOClassName"/>
        </xs:appinfo>
    </xs:annotation>
    <!-- ... -->
</xs:complexType>

What do you mean by "get the jaxb:class element to show?"

0

精彩评论

暂无评论...
验证码 换一张
取 消