xjc

XJC does not generate enum inside xs:union

核能气质少年 提交于 2021-02-07 13:15:42
问题 I have several XSD files containing structures like the following: <xs:complexType name="SomeThing" abstract="false"> <xs:sequence> <xs:element name="id" type="schema2:SomeIdTypeClass" minOccurs="1" maxOccurs="1"/> <xs:element name="myType" type="schema1:MyType" minOccurs="1" maxOccurs="1"/> </xs:sequence> </xs:complexType> <xs:simpleType name="MyType"> <xs:union> <xs:simpleType> <xs:restriction base="xs:string"> <xs:enumeration value="APPLE"/> <xs:enumeration value="ORANGE"/> <xs:enumeration

XJC does not generate enum inside xs:union

穿精又带淫゛_ 提交于 2021-02-07 13:14:03
问题 I have several XSD files containing structures like the following: <xs:complexType name="SomeThing" abstract="false"> <xs:sequence> <xs:element name="id" type="schema2:SomeIdTypeClass" minOccurs="1" maxOccurs="1"/> <xs:element name="myType" type="schema1:MyType" minOccurs="1" maxOccurs="1"/> </xs:sequence> </xs:complexType> <xs:simpleType name="MyType"> <xs:union> <xs:simpleType> <xs:restriction base="xs:string"> <xs:enumeration value="APPLE"/> <xs:enumeration value="ORANGE"/> <xs:enumeration

XJC does not generate enum inside xs:union

最后都变了- 提交于 2021-02-07 13:14:02
问题 I have several XSD files containing structures like the following: <xs:complexType name="SomeThing" abstract="false"> <xs:sequence> <xs:element name="id" type="schema2:SomeIdTypeClass" minOccurs="1" maxOccurs="1"/> <xs:element name="myType" type="schema1:MyType" minOccurs="1" maxOccurs="1"/> </xs:sequence> </xs:complexType> <xs:simpleType name="MyType"> <xs:union> <xs:simpleType> <xs:restriction base="xs:string"> <xs:enumeration value="APPLE"/> <xs:enumeration value="ORANGE"/> <xs:enumeration

how to rename nested classes in jaxb xjc

自闭症网瘾萝莉.ら 提交于 2020-06-22 04:11:21
问题 I have a wsdl that imports a schema I am trying to resolve xjc naming multiple nested MyElementName classes with the same name - which doesn't compile I have created this binding file below but it gives the error: parsing a schema... compiling a schema... Exception in thread "main" java.lang.IllegalArgumentException: Illegal class inheritance loop. Outer class MyElementName1 may not subclass from inner class: MyElementName1 at com.sun.codemodel.internal.JDefinedClass._extends(JDefinedClass

how to rename nested classes in jaxb xjc

我是研究僧i 提交于 2020-06-22 04:11:13
问题 I have a wsdl that imports a schema I am trying to resolve xjc naming multiple nested MyElementName classes with the same name - which doesn't compile I have created this binding file below but it gives the error: parsing a schema... compiling a schema... Exception in thread "main" java.lang.IllegalArgumentException: Illegal class inheritance loop. Outer class MyElementName1 may not subclass from inner class: MyElementName1 at com.sun.codemodel.internal.JDefinedClass._extends(JDefinedClass

XmlAdapter for base64Binary results in String

我是研究僧i 提交于 2020-01-24 11:10:07
问题 I've an XSD file containing this: <xsd:schema xmlns:xsd="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:extensionBindingPrefixes="xjc" elementFormDefault="qualified" targetNamespace="http://example.org/"> <xsd:complexType name="Certificate"> <xsd:sequence> <xsd:element name="certificate" type="xsd:base64Binary"> <xsd:annotation> <xsd:appinfo> <xjc:javaType name="java.security.cert.X509Certificate" adapter=

Prevent generation of duplicate classes from XSDs without namespaces

走远了吗. 提交于 2020-01-15 17:36:02
问题 I am currently implementing functionally for our Netbeans Platform application using classes generated by JAXB using the Mojo Maven plugin 'jaxb2-maven-plugin'. Unfortunately the creation of the XSD files is not in my hands and they are confidential. I am trying to provide a minimal running example to further demonstrate this but for now I hope that somebody can push me in the right direction solely from my description. We have many XSD files and got a few additions in the last weeks. Two of

Prevent generation of duplicate classes from XSDs without namespaces

白昼怎懂夜的黑 提交于 2020-01-15 17:35:42
问题 I am currently implementing functionally for our Netbeans Platform application using classes generated by JAXB using the Mojo Maven plugin 'jaxb2-maven-plugin'. Unfortunately the creation of the XSD files is not in my hands and they are confidential. I am trying to provide a minimal running example to further demonstrate this but for now I hope that somebody can push me in the right direction solely from my description. We have many XSD files and got a few additions in the last weeks. Two of

Prevent generation of duplicate classes from XSDs without namespaces

ぐ巨炮叔叔 提交于 2020-01-15 17:35:33
问题 I am currently implementing functionally for our Netbeans Platform application using classes generated by JAXB using the Mojo Maven plugin 'jaxb2-maven-plugin'. Unfortunately the creation of the XSD files is not in my hands and they are confidential. I am trying to provide a minimal running example to further demonstrate this but for now I hope that somebody can push me in the right direction solely from my description. We have many XSD files and got a few additions in the last weeks. Two of

XSD sequence compile to different lists

被刻印的时光 ゝ 提交于 2020-01-15 12:33:54
问题 I have XSD schema like this: <xs:complexType name="Element" abstract="true"> <xs:sequence maxOccurs="unbounded"> <xs:element name="resistor" type="vs:Resistor" maxOccurs="unbounded"/> <xs:element name="capacitor" type="vs:Capacitor" maxOccurs="unbounded"/> <xs:element name="inductor" type="vs:Inductor" maxOccurs="unbounded"/> </xs:sequence> </xs:complexType> And when I process this schema through JAXB I get a field like this: @XmlElements({ @XmlElement(name = "resistor", required = true, type