jaxb2-simplify-plugin

jaxb2 simplify plugin for xs:choice having same types

空扰寡人 提交于 2020-01-07 05:27:18
问题 I'm trying to use jaxb2 basics simplify plugin for my schema to JAXB conversion. It works fine for the complex types like below. Each element is defined inside the xs:choice has different types ( type1 and type2 ). sample.xsd (complex choice type with different type) <xs:complexType name="doclist"> <xs:sequence> <xs:choice minOccurs="0" maxOccurs="unbounded"> <xs:annotation> <xs:appinfo> <simplify:as-element-property /> </xs:appinfo> </xs:annotation> <xs:element name="document1" type="type1"

jaxb2 simplify plugin elements not simplified

China☆狼群 提交于 2019-12-13 05:26:16
问题 I have tried to convert XSD to JAXB classes using mave-jaxb2 plugin and jaxb2-basics simplify plugin. The configuration in pom.xml is available in this post sample.xsd (complex choice type) <xs:complexType name="doclist"> <xs:sequence> <xs:choice minOccurs="0" maxOccurs="unbounded"> <xs:element name="document1" type="type1"> <xs:annotation> <xs:appinfo> <simplify:as-reference-property/> </xs:appinfo> </xs:annotation> </xs:element> <xs:element name="document2" type="type2"> </xs:element> </xs

JAXB2 maven plugin in eclipse shows error

百般思念 提交于 2019-12-12 05:28:21
问题 I'm using JDK 1.6 (due to dependencies) and to generate classes from xsd, I have added maven-jaxb2 plugin as shown below in pom.xml. But the eclipse (Kepler) complains as below. Error parsing the command line [[-Xsimplify, -episode, D:\test\workspace\sample\target\generated-sources\xjc\META-INF\sun-jaxb.episode]] (org.jvnet.jaxb2.maven2:maven-jaxb2-plugin:0.8.1:generate:jaxb-test:generate-sources) pom.xml <plugins> <plugin> <artifactId>maven-compiler-plugin</artifactId> <version>3.1</version>

jaxb2 simplify plugin binding issue

醉酒当歌 提交于 2019-12-11 11:56:07
问题 I tried to use JAXB2 simplify plugin using the XJC 2.2.4. D:\>xjc -d . -extension -p org.my.space sample.xsd parsing a schema... [ERROR] Unsupported binding namespace "http://jaxb2-commons.dev.java.net/basic/simplify". Perhaps you meant "http://jaxb.dev.java.net/plugin/code-injector"? line 7 of file:/D:/sample.xsd Failed to parse a schema. sample.xsd has the declared simplify <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:jaxb="http://java.sun.com/xml/ns/jaxb" jaxb:version="2.1"

JAXB Simplify plugin vs *.xjb

放肆的年华 提交于 2019-12-10 09:31:34
问题 I'm trying to use the Simplify plugin to replace a complex property with a set of simpler ones. I made it working following the plugin's manual. But I can't change the original schema, so I have to use an external bindings.xjb. And it gives me all sort of errors. Does somebody have a working example of a similar thing? Original XSD: <xs:schema id="messages" elementFormDefault="qualified" version="Exchange2010_SP2" xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages" xmlns

JAXB Simplify plugin still usable?

…衆ロ難τιáo~ 提交于 2019-12-05 23:21:28
问题 I tried the solution of the question here JAXB Simplify plugin vs *.xjb. but it failed with the following exception " compiler was unable to honor this simplify:as-element-property customization. It is attached to a wrong place, or its inconsistent with other bindings. " this is customization binding I used <jaxb:bindings node="//xs:complexType[@name='Op']//xs:choice/xs:element[@name='Time']"> <simplify:as-element-property/> </jaxb:bindings> the jaxb simplify plugin confluence page is not

JAXB Simplify plugin vs *.xjb

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-05 17:04:26
I'm trying to use the Simplify plugin to replace a complex property with a set of simpler ones. I made it working following the plugin's manual. But I can't change the original schema, so I have to use an external bindings.xjb. And it gives me all sort of errors. Does somebody have a working example of a similar thing? Original XSD: <xs:schema id="messages" elementFormDefault="qualified" version="Exchange2010_SP2" xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages" xmlns:tns="http://schemas.microsoft.com/exchange/services/2006/messages" xmlns:t="http://schemas.microsoft.com

JAXB Simplify plugin still usable?

核能气质少年 提交于 2019-12-04 05:26:40
I tried the solution of the question here JAXB Simplify plugin vs *.xjb . but it failed with the following exception " compiler was unable to honor this simplify:as-element-property customization. It is attached to a wrong place, or its inconsistent with other bindings. " this is customization binding I used <jaxb:bindings node="//xs:complexType[@name='Op']//xs:choice/xs:element[@name='Time']"> <simplify:as-element-property/> </jaxb:bindings> the jaxb simplify plugin confluence page is not accessible, so has anyone used this plugin and can give an example please? Here is my updated schema