<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<id>tag:old.nabble.com,2006:forum-13500</id>
	<title>Nabble - java.net - jaxb users</title>
	<updated>2009-12-02T10:02:25Z</updated>
	<link rel="self" type="application/atom+xml" href="http://old.nabble.com/java.net---jaxb-users-f13500.xml" />
	<link rel="alternate" type="text/html" href="http://old.nabble.com/java.net---jaxb-users-f13500.html" />
	<subtitle type="html"></subtitle>
	
<entry>
	<id>tag:old.nabble.com,2006:post-26613484</id>
	<title>Having Namespace for every attribute</title>
	<published>2009-12-02T10:02:25Z</published>
	<updated>2009-12-02T10:02:25Z</updated>
	<author>
		<name>Chandran R</name>
	</author>
	<content type="html">Hi All,
&lt;br&gt;&lt;br&gt;We would like to use annotations and take advantage of jaxb for marshalling ang unmarshalling the Java Objects.
&lt;br&gt;These Objects are legacy code and hence we would like to add annotations only at class level i.e @XmlRootElement(name = &amp;quot;Title&amp;quot; , namespace=&amp;quot;com.company.referencedata&amp;quot;)
&lt;br&gt;&lt;br&gt;For ex 
&lt;br&gt;&lt;br&gt;@XmlRootElement(name = &amp;quot;Title&amp;quot; , namespace=&amp;quot;com.company.referencedata&amp;quot;)
&lt;br&gt;public class Title {
&lt;br&gt;private int id;
&lt;br&gt;&amp;nbsp;...
&lt;br&gt;}
&lt;br&gt;&lt;br&gt;What we have observed was the xml generated on marshalling had namespace included only for rootNode
&lt;br&gt;&lt;br&gt;ex: 
&lt;br&gt;&lt;br&gt;&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot; standalone=&amp;quot;yes&amp;quot;?&amp;gt;
&lt;br&gt;&amp;lt;ns2:Title xmlns:ns2=&amp;quot;com.company.referencedata&amp;quot;&amp;gt;
&lt;br&gt;&amp;lt;description&amp;gt;description&amp;lt;/description&amp;gt;
&lt;br&gt;&amp;lt;id&amp;gt;1&amp;lt;/id&amp;gt;
&lt;br&gt;&amp;lt;/ns2:Title&amp;gt;
&lt;br&gt;&lt;br&gt;We expected it to add even for elements
&lt;br&gt;&lt;br&gt;ex :
&lt;br&gt;&lt;br&gt;&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot; standalone=&amp;quot;yes&amp;quot;?&amp;gt;
&lt;br&gt;&amp;lt;ns2:Title xmlns:ns2=&amp;quot;com.company.referencedata&amp;quot;&amp;gt;
&lt;br&gt;&amp;lt;ns2:description&amp;gt;description&amp;lt;/ns2:description&amp;gt;
&lt;br&gt;&amp;lt;ns2:id&amp;gt;1&amp;lt;/ns2:id&amp;gt;
&lt;br&gt;&amp;lt;/ns2:Title&amp;gt;
&lt;br&gt;&lt;br&gt;&lt;br&gt;One solution is add @XMLElement for all the attributes, but is there any other way where we could include namespace ??
&lt;br&gt;&lt;br&gt;I am new to JAXB, Any help is highly appreciated.
&lt;br&gt;&lt;br&gt;Thanks In Advance
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Having-Namespace-for-every-attribute-tp26613484p26613484.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26611136</id>
	<title>Re: Unmarshalling ignores value of anyType element</title>
	<published>2009-12-02T07:49:58Z</published>
	<updated>2009-12-02T07:49:58Z</updated>
	<author>
		<name>fcamous</name>
	</author>
	<content type="html">Thanks Wolfgang,
&lt;br&gt;&lt;br&gt;I used the solution below and I could access the content of the tag.
&lt;br&gt;&lt;br&gt;Cheers,
&lt;br&gt;Fabrice
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;blockquote class=&quot;quote light-black dark-border-color&quot;&gt;&lt;div class=&quot;quote light-border-color&quot;&gt;
&lt;div class=&quot;quote-author&quot; style=&quot;font-weight: bold;&quot;&gt;Wolfgang Laun-2 wrote:&lt;/div&gt;
&lt;div class=&quot;quote-message shrinkable-quote&quot;&gt;The second case uses this schema definition:
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;lt;xs:complexType name=&amp;quot;MyTypeThree&amp;quot;&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;lt;xs:complexContent mixed=&amp;quot;1&amp;quot;&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;xs:extension base=&amp;quot;xs:anyType&amp;quot;/&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;lt;/xs:complexContent&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;lt;/xs:complexType&amp;gt;
&lt;br&gt;&lt;br&gt;Class MyTypeThree now has List&lt;Object&gt;&amp;nbsp;content, in order to
&lt;br&gt;collect text content chunks and child elements, as they appear
&lt;br&gt;in the element. Full blown processing after unmarshalling would
&lt;br&gt;have to instanceof-test the list elements, and process accordingly.
&lt;br&gt;For simple text content, you can expect a String object, which
&lt;br&gt;can also be put during marshalling.
&lt;br&gt;&lt;/div&gt;
&lt;/div&gt;&lt;/blockquote&gt;
</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Unmarshalling-ignores-value-of-anyType-element-tp26595595p26611136.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26605621</id>
	<title>Re: Unmarshalling ignores value of anyType element</title>
	<published>2009-12-02T01:05:12Z</published>
	<updated>2009-12-02T01:05:12Z</updated>
	<author>
		<name>Wolfgang Laun-2</name>
	</author>
	<content type="html">Similar questions crop up every now and then. That&amp;#39;s why I&amp;#39;ll&lt;br&gt;answer this in some detail.&lt;br&gt;&lt;br&gt;xs:anyType is the &amp;quot;ur-type&amp;quot; (W3C) of all complex schema types. There is a&lt;br&gt;restriction, xs:anySimpleType, the union of all simple types (and their xs:list&lt;br&gt;
derivations).&lt;br&gt;&lt;br&gt;This means that a binding of xs:anyType is not restricted in any way.&lt;br&gt;XML representations may have to add the type to the element, using, e.g.&lt;br&gt;&amp;lt;wild xsi:type=&amp;quot;xs:string&amp;quot;&lt;br&gt;          xmlns:xs=&amp;quot;&lt;a href=&quot;http://www.w3.org/2001/XMLSchema&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.w3.org/2001/XMLSchema&lt;/a&gt;&amp;quot;&lt;br&gt;
          xmlns:xsi=&amp;quot;&lt;a href=&quot;http://www.w3.org/2001/XMLSchema-instance&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.w3.org/2001/XMLSchema-instance&lt;/a&gt;&amp;quot;&amp;gt;Wild&amp;lt;/wild&amp;gt;&lt;br&gt;&lt;br&gt;Here is the corresponding schema using xs:anyType for an element type:&lt;br&gt;
  &amp;lt;xs:element name=&amp;quot;docOne&amp;quot; type=&amp;quot;DocTypeOne&amp;quot;/&amp;gt;&lt;br&gt;  &amp;lt;xs:complexType name=&amp;quot;DocTypeOne&amp;quot;&amp;gt;&lt;br&gt;    &amp;lt;xs:sequence&amp;gt;&lt;br&gt;      &amp;lt;xs:element name=&amp;quot;text&amp;quot; type=&amp;quot;xs:string&amp;quot;/&amp;gt;&lt;br&gt;
      &amp;lt;xs:element name=&amp;quot;wild&amp;quot; type=&amp;quot;xs:anyType&amp;quot;/&amp;gt;&lt;br&gt;    &amp;lt;/xs:sequence&amp;gt;&lt;br&gt;  &amp;lt;/xs:complexType&amp;gt;&lt;br&gt;&lt;br&gt;To marshal/unmarshal, simply use setWild( &amp;quot;...&amp;quot; )/getWild()&lt;br&gt;&lt;br&gt;An explicit complex type definition such as, e.g.,&lt;br&gt;
&lt;br&gt;  &amp;lt;xs:element name=&amp;quot;docTwo&amp;quot; type=&amp;quot;DocTypeTwo&amp;quot;/&amp;gt;&lt;br&gt;  &amp;lt;xs:complexType name=&amp;quot;DocTypeTwo&amp;quot;&amp;gt;&lt;br&gt;    &amp;lt;xs:sequence&amp;gt;&lt;br&gt;      &amp;lt;xs:element name=&amp;quot;text&amp;quot; type=&amp;quot;xs:string&amp;quot;/&amp;gt;&lt;br&gt;
      &amp;lt;xs:element name=&amp;quot;wild&amp;quot; type=&amp;quot;MyTypeTwo&amp;quot;/&amp;gt;&lt;br&gt;    &amp;lt;/xs:sequence&amp;gt;&lt;br&gt;  &amp;lt;/xs:complexType&amp;gt;&lt;br&gt;  &amp;lt;xs:complexType name=&amp;quot;MyTypeTwo&amp;quot;&amp;gt;&lt;br&gt;    &amp;lt;xs:complexContent&amp;gt;&lt;br&gt;
      &amp;lt;xs:extension base=&amp;quot;xs:anyType&amp;quot;/&amp;gt;&lt;br&gt;    &amp;lt;/xs:complexContent&amp;gt;&lt;br&gt;  &amp;lt;/xs:complexType&amp;gt;&lt;br&gt;&lt;br&gt;Results in a Java class MyTypeTwo, which (similar to your type &amp;quot;Varies&amp;quot;)&lt;br&gt;contains field List&amp;lt;Element&amp;gt; any (for all the element(!) children) and&lt;br&gt;
field Map&amp;lt;QName,String&amp;gt; otherAttributes (which might be there even&lt;br&gt;if not declared in the schema).&lt;br&gt;&lt;br&gt;But an XML element instance&lt;br&gt;   &amp;lt;wild&amp;gt;xyz&amp;lt;/wild&amp;gt;&lt;br&gt;doesn&amp;#39;t have a child element - it has text content. &lt;br&gt;
&lt;br&gt;At this point, you&amp;#39;ll have to decide: Would you prefer to wrap this data&lt;br&gt;in a subelement for &amp;lt;wild&amp;gt;, or do you modify the schema, defining&lt;br&gt;the complexType to be mixed?&lt;br&gt;&lt;br&gt;In the first case, marshalling and unmarshalling becomes complex,&lt;br&gt;
since you must create a org.w3c.dom.Element, from a JAXBElement&lt;br&gt;defining some tag, and insert this by calling getAny().add( domEl ); &lt;br&gt;and you must use getAny().getTextContent() to retrieve the&lt;br&gt;subelement&amp;#39;s content.&lt;br&gt;
&lt;br&gt;The second case uses this schema definition:&lt;br&gt;&lt;br&gt;  &amp;lt;xs:complexType name=&amp;quot;MyTypeThree&amp;quot;&amp;gt;&lt;br&gt;    &amp;lt;xs:complexContent mixed=&amp;quot;1&amp;quot;&amp;gt;&lt;br&gt;      &amp;lt;xs:extension base=&amp;quot;xs:anyType&amp;quot;/&amp;gt;&lt;br&gt;
    &amp;lt;/xs:complexContent&amp;gt;&lt;br&gt;  &amp;lt;/xs:complexType&amp;gt;&lt;br&gt;&lt;br&gt;Class MyTypeThree now has List&amp;lt;Object&amp;gt; content, in order to&lt;br&gt;collect text content chunks and child elements, as they appear&lt;br&gt;in the element. Full blown processing after unmarshalling would&lt;br&gt;
have to instanceof-test the list elements, and process accordingly.&lt;br&gt;For simple text content, you can expect a String object, which&lt;br&gt;can also be put during marshalling.&lt;br&gt;&lt;br&gt;-W&lt;br&gt;&lt;br&gt;&lt;div class=&quot;gmail_quote&quot;&gt;On Tue, Dec 1, 2009 at 6:55 PM, fcamous &lt;span dir=&quot;ltr&quot;&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26605621&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;fabrice.camous@...&lt;/a&gt;&amp;gt;&lt;/span&gt; wrote:&lt;br&gt;
&lt;blockquote class=&quot;gmail_quote&quot; style=&quot;border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;&quot;&gt;&lt;br&gt;
Hi all,&lt;br&gt;
&lt;br&gt;
I&amp;#39;m having problem accessing a value contained in an anyType element:&lt;br&gt;
&lt;br&gt;
I have this data type called &amp;quot;varies&amp;quot; in my schema:&lt;br&gt;
&amp;lt;xsd:complexType name=&amp;quot;varies&amp;quot;&amp;gt;&lt;br&gt;
&amp;lt;xsd:complexContent&amp;gt;&lt;br&gt;
&amp;lt;xsd:extension base=&amp;quot;xsd:anyType&amp;quot;/&amp;gt;&lt;br&gt;
&amp;lt;/xsd:complexContent&amp;gt;&lt;br&gt;
&amp;lt;/xsd:complexType&amp;gt;&lt;br&gt;
&lt;br&gt;
xjc generates Varies.java and I have an getter to access the value:&lt;br&gt;
public List&amp;lt;Element&amp;gt; getAny() {&lt;br&gt;
if (any == null) {&lt;br&gt;
any = new ArrayList&amp;lt;Element&amp;gt;();&lt;br&gt;
}&lt;br&gt;
return this.any;&lt;br&gt;
}&lt;br&gt;
&lt;br&gt;
I&amp;#39;m unmarshalling an xml document and this is the part I am interested in:&lt;br&gt;
&amp;lt;OBX.5&amp;gt;&lt;br&gt;
6.4&lt;br&gt;
&amp;lt;/OBX.5&amp;gt;&lt;br&gt;
&lt;br&gt;
&amp;quot;OBX.5&amp;quot; is an extension of &amp;quot;varies&amp;quot; type.&lt;br&gt;
xjc generates OBX5CONTENT.java which inherits the getAny() method. However,&lt;br&gt;
after unmarshalling, when I use the method in my code, the list of&lt;br&gt;
org.w3c.dom.Element objects it returns is always empty. Note that I have&lt;br&gt;
access to other fields of the OBX5CONTENT object without a problem.&lt;br&gt;
Any idea?&lt;br&gt;
Thanks in advance.&lt;br&gt;
&lt;br&gt;
Here&amp;#39;s the OBX.5 schema definition if it&amp;#39;s needed:&lt;br&gt;
&amp;lt;xsd:attributeGroup name=&amp;quot;OBX.5.ATTRIBUTES&amp;quot;&amp;gt;&lt;br&gt;
&amp;lt;xsd:attribute name=&amp;quot;Item&amp;quot; type=&amp;quot;xsd:string&amp;quot; fixed=&amp;quot;573&amp;quot;/&amp;gt;&lt;br&gt;
&amp;lt;xsd:attribute name=&amp;quot;Type&amp;quot; type=&amp;quot;xsd:string&amp;quot; fixed=&amp;quot;varies&amp;quot;/&amp;gt;&lt;br&gt;
&amp;lt;xsd:attribute name=&amp;quot;LongName&amp;quot; type=&amp;quot;xsd:string&amp;quot; fixed=&amp;quot;Observation Value&amp;quot;/&amp;gt;&lt;br&gt;
&amp;lt;/xsd:attributeGroup&amp;gt;&lt;br&gt;
&amp;lt;xsd:complexType name=&amp;quot;OBX.5.CONTENT&amp;quot;&amp;gt;&lt;br&gt;
&amp;lt;xsd:annotation&amp;gt;&lt;br&gt;
&amp;lt;xsd:documentation xml:lang=&amp;quot;en&amp;quot;&amp;gt;Observation Value&amp;lt;/xsd:documentation&amp;gt;&lt;br&gt;
&amp;lt;xsd:appinfo&amp;gt;&lt;br&gt;
&amp;lt;hl7:Item&amp;gt;573&amp;lt;/hl7:Item&amp;gt;&lt;br&gt;
&amp;lt;hl7:Type&amp;gt;varies&amp;lt;/hl7:Type&amp;gt;&lt;br&gt;
&amp;lt;hl7:LongName&amp;gt;Observation Value&amp;lt;/hl7:LongName&amp;gt;&lt;br&gt;
&amp;lt;/xsd:appinfo&amp;gt;&lt;br&gt;
&amp;lt;/xsd:annotation&amp;gt;&lt;br&gt;
&amp;lt;xsd:complexContent&amp;gt;&lt;br&gt;
&amp;lt;xsd:extension base=&amp;quot;varies&amp;quot;&amp;gt;&lt;br&gt;
&amp;lt;xsd:attributeGroup ref=&amp;quot;OBX.5.ATTRIBUTES&amp;quot;/&amp;gt;&lt;br&gt;
&amp;lt;/xsd:extension&amp;gt;&lt;br&gt;
&amp;lt;/xsd:complexContent&amp;gt;&lt;br&gt;
&amp;lt;/xsd:complexType&amp;gt;&lt;br&gt;
&amp;lt;xsd:element name=&amp;quot;OBX.5&amp;quot; type=&amp;quot;OBX.5.CONTENT&amp;quot;/&amp;gt;&lt;br&gt;
&lt;font color=&quot;#888888&quot;&gt;--&lt;br&gt;
View this message in context: &lt;a href=&quot;http://old.nabble.com/Unmarshalling-ignores-value-of-anyType-element-tp26595595p26595595.html&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://old.nabble.com/Unmarshalling-ignores-value-of-anyType-element-tp26595595p26595595.html&lt;/a&gt;&lt;br&gt;

Sent from the &lt;a href=&quot;http://java.net&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;java.net&lt;/a&gt; - jaxb users mailing list archive at Nabble.com.&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
---------------------------------------------------------------------&lt;br&gt;
To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26605621&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-unsubscribe@...&lt;/a&gt;&lt;br&gt;
For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26605621&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-help@...&lt;/a&gt;&lt;br&gt;
&lt;br&gt;
&lt;/font&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;br&gt;
</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Unmarshalling-ignores-value-of-anyType-element-tp26595595p26605621.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26595595</id>
	<title>Unmarshalling ignores value of anyType element</title>
	<published>2009-12-01T09:55:16Z</published>
	<updated>2009-12-01T09:55:16Z</updated>
	<author>
		<name>fcamous</name>
	</author>
	<content type="html">Hi all,
&lt;br&gt;&lt;br&gt;I'm having problem accessing a value contained in an anyType element:
&lt;br&gt;&lt;br&gt;I have this data type called &amp;quot;varies&amp;quot; in my schema:
&lt;br&gt;&amp;lt;xsd:complexType name=&amp;quot;varies&amp;quot;&amp;gt;
&lt;br&gt;&amp;lt;xsd:complexContent&amp;gt;
&lt;br&gt;&amp;lt;xsd:extension base=&amp;quot;xsd:anyType&amp;quot;/&amp;gt;
&lt;br&gt;&amp;lt;/xsd:complexContent&amp;gt;
&lt;br&gt;&amp;lt;/xsd:complexType&amp;gt;
&lt;br&gt;&lt;br&gt;xjc generates Varies.java and I have an getter to access the value:
&lt;br&gt;public List&amp;lt;Element&amp;gt; getAny() {
&lt;br&gt;if (any == null) {
&lt;br&gt;any = new ArrayList&amp;lt;Element&amp;gt;();
&lt;br&gt;}
&lt;br&gt;return this.any;
&lt;br&gt;}
&lt;br&gt;&lt;br&gt;I'm unmarshalling an xml document and this is the part I am interested in:
&lt;br&gt;&amp;lt;OBX.5&amp;gt;
&lt;br&gt;6.4
&lt;br&gt;&amp;lt;/OBX.5&amp;gt;
&lt;br&gt;&lt;br&gt;&amp;quot;OBX.5&amp;quot; is an extension of &amp;quot;varies&amp;quot; type.
&lt;br&gt;xjc generates OBX5CONTENT.java which inherits the getAny() method. However, after unmarshalling, when I use the method in my code, the list of org.w3c.dom.Element objects it returns is always empty. Note that I have access to other fields of the OBX5CONTENT object without a problem.
&lt;br&gt;Any idea?
&lt;br&gt;Thanks in advance.
&lt;br&gt;&lt;br&gt;Here's the OBX.5 schema definition if it's needed:
&lt;br&gt;&amp;lt;xsd:attributeGroup name=&amp;quot;OBX.5.ATTRIBUTES&amp;quot;&amp;gt;
&lt;br&gt;&amp;lt;xsd:attribute name=&amp;quot;Item&amp;quot; type=&amp;quot;xsd:string&amp;quot; fixed=&amp;quot;573&amp;quot;/&amp;gt;
&lt;br&gt;&amp;lt;xsd:attribute name=&amp;quot;Type&amp;quot; type=&amp;quot;xsd:string&amp;quot; fixed=&amp;quot;varies&amp;quot;/&amp;gt;
&lt;br&gt;&amp;lt;xsd:attribute name=&amp;quot;LongName&amp;quot; type=&amp;quot;xsd:string&amp;quot; fixed=&amp;quot;Observation Value&amp;quot;/&amp;gt;
&lt;br&gt;&amp;lt;/xsd:attributeGroup&amp;gt;
&lt;br&gt;&amp;lt;xsd:complexType name=&amp;quot;OBX.5.CONTENT&amp;quot;&amp;gt;
&lt;br&gt;&amp;lt;xsd:annotation&amp;gt;
&lt;br&gt;&amp;lt;xsd:documentation xml:lang=&amp;quot;en&amp;quot;&amp;gt;Observation Value&amp;lt;/xsd:documentation&amp;gt;
&lt;br&gt;&amp;lt;xsd:appinfo&amp;gt;
&lt;br&gt;&amp;lt;hl7:Item&amp;gt;573&amp;lt;/hl7:Item&amp;gt;
&lt;br&gt;&amp;lt;hl7:Type&amp;gt;varies&amp;lt;/hl7:Type&amp;gt;
&lt;br&gt;&amp;lt;hl7:LongName&amp;gt;Observation Value&amp;lt;/hl7:LongName&amp;gt;
&lt;br&gt;&amp;lt;/xsd:appinfo&amp;gt;
&lt;br&gt;&amp;lt;/xsd:annotation&amp;gt;
&lt;br&gt;&amp;lt;xsd:complexContent&amp;gt;
&lt;br&gt;&amp;lt;xsd:extension base=&amp;quot;varies&amp;quot;&amp;gt;
&lt;br&gt;&amp;lt;xsd:attributeGroup ref=&amp;quot;OBX.5.ATTRIBUTES&amp;quot;/&amp;gt;
&lt;br&gt;&amp;lt;/xsd:extension&amp;gt;
&lt;br&gt;&amp;lt;/xsd:complexContent&amp;gt;
&lt;br&gt;&amp;lt;/xsd:complexType&amp;gt;
&lt;br&gt;&amp;lt;xsd:element name=&amp;quot;OBX.5&amp;quot; type=&amp;quot;OBX.5.CONTENT&amp;quot;/&amp;gt; </content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Unmarshalling-ignores-value-of-anyType-element-tp26595595p26595595.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26579697</id>
	<title>Re: how to get the annotations with the methods in stead of with the  fields?</title>
	<published>2009-11-30T10:38:24Z</published>
	<updated>2009-11-30T10:38:24Z</updated>
	<author>
		<name>Wolfgang Laun-2</name>
	</author>
	<content type="html">On Mon, Nov 30, 2009 at 3:45 PM, xtien &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26579697&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;christine@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; There is an annotation @XmlAccessorType(XmlAccessType.FIELD) in the xml files
&lt;br&gt;&amp;gt; that the Jaxb plugin has generated. According to Jaxb documentation,
&lt;br&gt;&amp;gt; @XmlAccessorType(XmlAccessType.PUBLIC_MEMBER) is default. So my question
&lt;br&gt;&amp;gt; boils down to how to I get the plugin to follow the default behavior for
&lt;br&gt;&amp;gt; @XmlAccessorType?
&lt;br&gt;&amp;gt;
&lt;br&gt;&lt;br&gt;This is controlled by xjc, the JAXB schema compiler, which has a definite code
&lt;br&gt;model, according to which Java code is generated.
&lt;br&gt;&lt;br&gt;&amp;gt; Again, this would save me time.
&lt;br&gt;&lt;br&gt;All right, and it would save the time of the volunteers on this list if you
&lt;br&gt;would post the data describing the problem you have, as I have urged you
&lt;br&gt;to do. Either do this, or, please, stop wasting your and our time.
&lt;br&gt;&lt;br&gt;-W
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; The getter names I have are standard camel
&lt;br&gt;&amp;gt; case, but the field names use upper case and lower case more or less at
&lt;br&gt;&amp;gt; random because they were generated from a system in which I can't control
&lt;br&gt;&amp;gt; field names. There should be a configuration file for jaxb, but I can't find
&lt;br&gt;&amp;gt; one.
&lt;br&gt;&amp;gt; --
&lt;br&gt;&amp;gt; View this message in context: &lt;a href=&quot;http://old.nabble.com/how-to-get-the-annotations-with-the-methods-in-stead-of-with-the-fields--tp26529506p26575846.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://old.nabble.com/how-to-get-the-annotations-with-the-methods-in-stead-of-with-the-fields--tp26529506p26575846.html&lt;/a&gt;&lt;br&gt;&amp;gt; Sent from the java.net - jaxb users mailing list archive at Nabble.com.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; ---------------------------------------------------------------------
&lt;br&gt;&amp;gt; To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26579697&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-unsubscribe@...&lt;/a&gt;
&lt;br&gt;&amp;gt; For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26579697&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-help@...&lt;/a&gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;/div&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26579697&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-unsubscribe@...&lt;/a&gt;
&lt;br&gt;For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26579697&amp;i=4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-help@...&lt;/a&gt;
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/how-to-get-the-annotations-with-the-methods-in-stead-of-with-the-fields--tp26529506p26579697.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26575846</id>
	<title>Re: how to get the annotations with the methods in stead of with the  fields?</title>
	<published>2009-11-30T06:45:08Z</published>
	<updated>2009-11-30T06:45:08Z</updated>
	<author>
		<name>xtien</name>
	</author>
	<content type="html">There is an annotation @XmlAccessorType(XmlAccessType.FIELD) in the xml files that the Jaxb plugin has generated. According to Jaxb documentation, @XmlAccessorType(XmlAccessType.PUBLIC_MEMBER) is default. So my question boils down to how to I get the plugin to follow the default behavior for @XmlAccessorType?
&lt;br&gt;&lt;br&gt;Again, this would save me time. The getter names I have are standard camel case, but the field names use upper case and lower case more or less at random because they were generated from a system in which I can't control field names. There should be a configuration file for jaxb, but I can't find one.</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/how-to-get-the-annotations-with-the-methods-in-stead-of-with-the-fields--tp26529506p26575846.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26540620</id>
	<title>Re: XJC: get the Annotation-Information of a field</title>
	<published>2009-11-27T02:40:22Z</published>
	<updated>2009-11-27T02:40:22Z</updated>
	<author>
		<name>Florian Bachmann-2</name>
	</author>
	<content type="html">Hey Aleksei and Wolfgang!
&lt;br&gt;Thanks a million! (:
&lt;br&gt;&lt;br&gt;regards Flori
&lt;br&gt;&lt;br&gt;On 27.11.2009, at 10:20, Aleksei Valikov wrote:
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Hi,
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt;&amp;gt; Dear XJC-Users,
&lt;br&gt;&amp;gt;&amp;gt; how I can find out, how an field is annotated?
&lt;br&gt;&amp;gt;&amp;gt; 
&lt;br&gt;&amp;gt;&amp;gt; Suppose I have a class with two fields:
&lt;br&gt;&amp;gt;&amp;gt; SupposedClass {
&lt;br&gt;&amp;gt;&amp;gt; @XmlElement(name = &amp;quot;AnElement&amp;quot;)
&lt;br&gt;&amp;gt;&amp;gt; protected AnElement anElement;
&lt;br&gt;&amp;gt;&amp;gt; @XmlAttribute(name = &amp;quot;attribute&amp;quot;)
&lt;br&gt;&amp;gt;&amp;gt; protected AnAttribute attribute;
&lt;br&gt;&amp;gt;&amp;gt; }
&lt;br&gt;&amp;gt;&amp;gt; 
&lt;br&gt;&amp;gt;&amp;gt; How can I find out, if an field is an XmlElement or an XmlAttribute and which name it uses?
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &lt;a href=&quot;https://jaxb2-reflection.dev.java.net/users-guide.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://jaxb2-reflection.dev.java.net/users-guide.html&lt;/a&gt;&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Bye.
&lt;br&gt;&amp;gt; /lexi
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; ---------------------------------------------------------------------
&lt;br&gt;&amp;gt; To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26540620&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-unsubscribe@...&lt;/a&gt;
&lt;br&gt;&amp;gt; For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26540620&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-help@...&lt;/a&gt;
&lt;br&gt;&amp;gt; 
&lt;/div&gt;&lt;br&gt;--
&lt;br&gt;Florian Bachmann, Softwareentwicklung
&lt;br&gt;Micromata GmbH
&lt;br&gt;Hauptsitz: Marie-Calm Str. 1-5, D-34131 Kassel
&lt;br&gt;Niederlassung Bonn: Menuhinstr. 8, 53113 Bonn
&lt;br&gt;Tel: +49 561 / 31 67 93 - 0
&lt;br&gt;Fax: +49 561 / 31 67 93 - 11
&lt;br&gt;mailto: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26540620&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;f.bachmann@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://www.micromata.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.micromata.com&lt;/a&gt;&lt;br&gt;AG Kassel HRB 7370
&lt;br&gt;Geschäftsführung:
&lt;br&gt;Dipl.-Ing. Thomas Landgraf
&lt;br&gt;Dipl.-Phys. Kai Reinhard
&lt;br&gt;&lt;br&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26540620&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-unsubscribe@...&lt;/a&gt;
&lt;br&gt;For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26540620&amp;i=4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-help@...&lt;/a&gt;
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/XJC%3A-get-the-Annotation-Information-of-a-field-tp26538715p26540620.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26539740</id>
	<title>Re: XJC: get the Annotation-Information of a field</title>
	<published>2009-11-27T01:20:46Z</published>
	<updated>2009-11-27T01:20:46Z</updated>
	<author>
		<name>Aleksei Valikov</name>
	</author>
	<content type="html">Hi,
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Dear XJC-Users,
&lt;br&gt;&amp;gt; how I can find out, how an field is annotated?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Suppose I have a class with two fields:
&lt;br&gt;&amp;gt; SupposedClass {
&lt;br&gt;&amp;gt; @XmlElement(name = &amp;quot;AnElement&amp;quot;)
&lt;br&gt;&amp;gt; protected AnElement anElement;
&lt;br&gt;&amp;gt; @XmlAttribute(name = &amp;quot;attribute&amp;quot;)
&lt;br&gt;&amp;gt; protected AnAttribute attribute;
&lt;br&gt;&amp;gt; }
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; How can I find out, if an field is an XmlElement or an XmlAttribute and which name it uses?
&lt;/div&gt;&lt;br&gt;&lt;a href=&quot;https://jaxb2-reflection.dev.java.net/users-guide.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://jaxb2-reflection.dev.java.net/users-guide.html&lt;/a&gt;&lt;br&gt;&lt;br&gt;Bye.
&lt;br&gt;/lexi
&lt;br&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26539740&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-unsubscribe@...&lt;/a&gt;
&lt;br&gt;For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26539740&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-help@...&lt;/a&gt;
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/XJC%3A-get-the-Annotation-Information-of-a-field-tp26538715p26539740.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26539647</id>
	<title>Re: XJC: get the Annotation-Information of a field</title>
	<published>2009-11-27T01:11:33Z</published>
	<updated>2009-11-27T01:11:33Z</updated>
	<author>
		<name>Wolfgang Laun-2</name>
	</author>
	<content type="html">On Fri, Nov 27, 2009 at 8:25 AM, Florian Bachmann &lt;span dir=&quot;ltr&quot;&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26539647&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;f.bachmann@...&lt;/a&gt;&amp;gt;&lt;/span&gt; wrote:&lt;br&gt;&lt;div class=&quot;gmail_quote&quot;&gt;&lt;blockquote class=&quot;gmail_quote&quot; style=&quot;border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;&quot;&gt;
Dear XJC-Users,&lt;br&gt;
how I can find out, how an field is annotated?&lt;br&gt;
&lt;br&gt;
Suppose I have a class with two fields:&lt;br&gt;
SupposedClass {&lt;br&gt;
@XmlElement(name = &amp;quot;AnElement&amp;quot;)&lt;br&gt;
protected AnElement anElement;&lt;br&gt;
@XmlAttribute(name = &amp;quot;attribute&amp;quot;)&lt;br&gt;
protected AnAttribute attribute;&lt;br&gt;
}&lt;br&gt;
&lt;br&gt;
How can I find out, if an field is an XmlElement or an XmlAttribute and which name it uses?&lt;br&gt;
&lt;br&gt;&lt;/blockquote&gt;&lt;div&gt;&lt;br&gt;See the code below. - You may want to catch the &amp;quot;##default&amp;quot; and replace it with the field&amp;#39;s own name.&lt;br&gt;-W&lt;br&gt;
&lt;br&gt;
import java.util.*;&lt;br&gt;
import java.lang.reflect.*;&lt;br&gt;
import java.lang.annotation.*;&lt;br&gt;
import javax.xml.bind.annotation.*;&lt;br&gt;
&lt;br&gt;
public class AnnotationReader {&lt;br&gt;
&lt;br&gt;
    private final Class clazz;&lt;br&gt;
&lt;br&gt;
    public AnnotationReader( Class clazz ){&lt;br&gt;
        this.clazz = clazz;&lt;br&gt;
    }&lt;br&gt;
&lt;br&gt;
    private List&amp;lt;Field&amp;gt; getFieldsWith( Class annotation ){&lt;br&gt;
        Field[] fields = clazz.getDeclaredFields();&lt;br&gt;
        List&amp;lt;Field&amp;gt; fList = new ArrayList&amp;lt;Field&amp;gt;();&lt;br&gt;
        for( Field f: fields ){&lt;br&gt;
            Annotation[] annos = f.getDeclaredAnnotations();&lt;br&gt;
            for( Annotation a: annos ){&lt;br&gt;
                if( annotation.isInstance( a ) ){&lt;br&gt;
                    fList.add( f );&lt;br&gt;
                    break;&lt;br&gt;
                }&lt;br&gt;
            }&lt;br&gt;
        }&lt;br&gt;
        return fList;&lt;br&gt;
    }&lt;br&gt;
&lt;br&gt;
    public List&amp;lt;Field&amp;gt; getElementFields(){&lt;br&gt;
        return getFieldsWith( XmlElement.class );&lt;br&gt;
    }&lt;br&gt;
&lt;br&gt;
    public List&amp;lt;Field&amp;gt; getAttributeFields(){&lt;br&gt;
        return getFieldsWith( XmlAttribute.class );&lt;br&gt;
    }&lt;br&gt;&lt;br&gt;
    public Map&amp;lt;String,String&amp;gt; getSchemaNames() throws Exception {&lt;br&gt;        Field[] fields = clazz.getDeclaredFields();&lt;br&gt;        Map&amp;lt;String,String&amp;gt; field2tag = new HashMap&amp;lt;String,String&amp;gt;();&lt;br&gt;        for( Field f: fields ){&lt;br&gt;
            Annotation[] annos = f.getDeclaredAnnotations();&lt;br&gt;            for( Annotation a: annos ){&lt;br&gt;                if( a instanceof XmlElement ||&lt;br&gt;                    a instanceof XmlAttribute ){&lt;br&gt;                    Class annoClass = a.annotationType();&lt;br&gt;
                    String tName = (String)annoClass.getMethod( &amp;quot;name&amp;quot; ).invoke( a );&lt;br&gt;                    field2tag.put( f.getName(), tName );&lt;br&gt;                }&lt;br&gt;            }&lt;br&gt;        }&lt;br&gt;        return field2tag;&lt;br&gt;
    }&lt;br&gt;
}&lt;br&gt;&lt;br&gt;&lt;/div&gt;&lt;/div&gt;&lt;br&gt;
</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/XJC%3A-get-the-Annotation-Information-of-a-field-tp26538715p26539647.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26538715</id>
	<title>XJC: get the Annotation-Information of a field</title>
	<published>2009-11-26T23:25:18Z</published>
	<updated>2009-11-26T23:25:18Z</updated>
	<author>
		<name>Florian Bachmann-2</name>
	</author>
	<content type="html">Dear XJC-Users,
&lt;br&gt;how I can find out, how an field is annotated? 
&lt;br&gt;&lt;br&gt;Suppose I have a class with two fields:
&lt;br&gt;SupposedClass {
&lt;br&gt;@XmlElement(name = &amp;quot;AnElement&amp;quot;)
&lt;br&gt;protected AnElement anElement;
&lt;br&gt;@XmlAttribute(name = &amp;quot;attribute&amp;quot;)
&lt;br&gt;protected AnAttribute attribute;
&lt;br&gt;}
&lt;br&gt;&lt;br&gt;How can I find out, if an field is an XmlElement or an XmlAttribute and which name it uses?
&lt;br&gt;&lt;br&gt;regards Flori
&lt;br&gt;&lt;br&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26538715&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-unsubscribe@...&lt;/a&gt;
&lt;br&gt;For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26538715&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-help@...&lt;/a&gt;
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/XJC%3A-get-the-Annotation-Information-of-a-field-tp26538715p26538715.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26531826</id>
	<title>Re: how to get the annotations with the methods in stead of with the  fields?</title>
	<published>2009-11-26T08:27:26Z</published>
	<updated>2009-11-26T08:27:26Z</updated>
	<author>
		<name>xtien</name>
	</author>
	<content type="html">&lt;br&gt;&lt;blockquote class=&quot;quote light-black dark-border-color&quot;&gt;&lt;div class=&quot;quote light-border-color&quot;&gt;
&lt;div class=&quot;quote-author&quot; style=&quot;font-weight: bold;&quot;&gt;Wolfgang Laun-2 wrote:&lt;/div&gt;
&lt;div class=&quot;quote-message&quot;&gt;On Thu, Nov 26, 2009 at 4:21 PM, xtien &amp;lt;christine@christine.nl&amp;gt; wrote:
&lt;br&gt;Anyway, assuming you get the @XmlElement annotation, what's in there that
&lt;br&gt;is so desirable to have in an application? (I admit, I'm *very* curious ;-)
&lt;/div&gt;
&lt;/div&gt;&lt;/blockquote&gt;
My app converts from and to an api that uses weird names. Jaxb creates decent getters and setters from the xsd that I created from the api, but as the api uses uppercase and lowercase more or less at random, it's easier to use the original element names than to try to create them from the getter name.
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/how-to-get-the-annotations-with-the-methods-in-stead-of-with-the-fields--tp26529506p26531826.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26531596</id>
	<title>Re: Marshal to unqualified form?</title>
	<published>2009-11-26T08:11:28Z</published>
	<updated>2009-11-26T08:11:28Z</updated>
	<author>
		<name>davidkarlsen</name>
	</author>
	<content type="html">On Thu, 26 Nov 2009, Wolfgang Laun wrote:
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; On Thu, Nov 26, 2009 at 3:15 PM, &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26531596&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;david@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Do I have to write a NamespacePrefixFormatter to get them unqialified? I
&lt;br&gt;&amp;gt;&amp;gt; cannot seem to find any options for the Marshaller to get this OOTB.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; The other alternative of course, is to change the elementQualification in
&lt;br&gt;&amp;gt;&amp;gt; the schema - but as these are external I'd rather try to avoid that ( and it
&lt;br&gt;&amp;gt;&amp;gt; would be nice to control it at runtime - to be able to support both forms if
&lt;br&gt;&amp;gt;&amp;gt; neccessary).
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Does this change really remove the NS prefixes from the marshalled XML?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; If not, please post the &amp;lt;xs:schema&amp;gt; element in full.
&lt;br&gt;&amp;gt; -W
&lt;/div&gt;&lt;br&gt;I was a little short-thought about this.
&lt;br&gt;The jaxbmarshaller was defined with several contexts, hence it knew 
&lt;br&gt;several namespaces, and they were all included in the root element and all 
&lt;br&gt;the elemes were marshalled with a namespaceprefix.
&lt;br&gt;&lt;br&gt;i split it up in one context pr. schema and the one namespace is then 
&lt;br&gt;defined as targetdefault on the root node, and all the children are 
&lt;br&gt;defined without prefixes.
&lt;br&gt;&lt;br&gt;--
&lt;br&gt;David J. M. Karlsen - +47 90 68 22 43
&lt;br&gt;&lt;a href=&quot;http://www.davidkarlsen.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.davidkarlsen.com&lt;/a&gt;&lt;br&gt;&lt;a href=&quot;http://mp3.davidkarlsen.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://mp3.davidkarlsen.com&lt;/a&gt;&lt;br&gt;Sent from my bog-standard SMTP client
&lt;br&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26531596&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-unsubscribe@...&lt;/a&gt;
&lt;br&gt;For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26531596&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-help@...&lt;/a&gt;
&lt;br&gt;&lt;br&gt;&lt;div class=&quot;signature&quot;&gt;&lt;a href=&quot;http://www.davidkarlsen.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.davidkarlsen.com&lt;/a&gt;&lt;/div&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Marshal-to-unqualified-form--tp26530045p26531596.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26531349</id>
	<title>Re: how to get the annotations with the methods in stead of with the  fields?</title>
	<published>2009-11-26T07:51:46Z</published>
	<updated>2009-11-26T07:51:46Z</updated>
	<author>
		<name>Wolfgang Laun-2</name>
	</author>
	<content type="html">On Thu, Nov 26, 2009 at 4:21 PM, xtien &lt;span dir=&quot;ltr&quot;&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26531349&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;christine@...&lt;/a&gt;&amp;gt;&lt;/span&gt; wrote:&lt;br&gt;&lt;div class=&quot;gmail_quote&quot;&gt;&lt;blockquote class=&quot;gmail_quote&quot; style=&quot;border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;&quot;&gt;

&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
Wolfgang Laun-2 wrote:&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; On Thu, Nov 26, 2009 at 2:34 PM, xtien &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26531349&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;christine@...&lt;/a&gt;&amp;gt; wrote:&lt;br&gt;
&amp;gt;&amp;gt;&lt;br&gt;
&amp;gt;&amp;gt; The Jaxb Eclipse plugin generates @XmlElement annotations with the field&lt;br&gt;
&amp;gt;&amp;gt; names. In my app, it would be more convenient to have the annotations&lt;br&gt;
&amp;gt;&amp;gt; with&lt;br&gt;
&amp;gt;&amp;gt; the getter.&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; Why? Perhaps you post what you want to achieve.&lt;br&gt;
&amp;gt;&lt;br&gt;
&lt;br&gt;
Does it matter?&lt;br&gt;&lt;/blockquote&gt;&lt;div&gt;&lt;br&gt;There might be another way of getting what you want, from the XmlElement&lt;br&gt;annotation.&lt;br&gt;&lt;br&gt;&lt;/div&gt;&lt;blockquote class=&quot;gmail_quote&quot; style=&quot;border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;&quot;&gt;


In my code at some point I have a getter method. The code invokes the method&lt;br&gt;
on a class. With this invocation, the code needs the name of the element&lt;br&gt;
that&amp;#39;s in the information from the XmlElement. If the naming of methods and&lt;br&gt;
fields were standard, I could simply get the annotation from the field by&lt;br&gt;
creating the field name from the getter name and get the fields annotation.&lt;br&gt;&lt;/blockquote&gt;&lt;div&gt;&lt;br&gt;The JAXB plugin just uses xjc to generate classes from an XML schema, and this&lt;br&gt;produces, for a field called fooBar, a getter getFooBar (or isFooBar for boolean).&lt;br&gt;
Weird names &lt;i&gt;might&lt;/i&gt; muddle the issue, but basically it&amp;#39;s quite simple.&lt;br&gt; &lt;/div&gt;&lt;blockquote class=&quot;gmail_quote&quot; style=&quot;border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;&quot;&gt;
However, the classes are genereated based on xml from a system that does not&lt;br&gt;
conform to standard field names. I am not in control of that system. It&amp;#39;s&lt;br&gt;
hard to create a field name from a getter name, so that&amp;#39;s why it would be&lt;br&gt;
convenient to have the annotation with the getter.&lt;br&gt;
Actually, all I want to do is retrieve the original element name in a piece&lt;br&gt;
of code where I have the getter method but not the field that it goes with.&lt;br&gt;
&lt;font color=&quot;#888888&quot;&gt;&lt;br&gt;&lt;/font&gt;&lt;/blockquote&gt;&lt;div&gt;&lt;br&gt;Anyway, assuming you get the @XmlElement annotation, what&amp;#39;s in there that&lt;br&gt;is so desirable to have in an application? (I admit, I&amp;#39;m &lt;i&gt;very&lt;/i&gt; curious ;-)&lt;br&gt;
&lt;/div&gt;&lt;div&gt;&lt;br&gt;-W&lt;br&gt;&lt;br&gt; &lt;/div&gt;&lt;blockquote class=&quot;gmail_quote&quot; style=&quot;border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;&quot;&gt;&lt;font color=&quot;#888888&quot;&gt;
--&lt;br&gt;
View this message in context: &lt;a href=&quot;http://old.nabble.com/how-to-get-the-annotations-with-the-methods-in-stead-of-with-the-fields--tp26529506p26530937.html&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://old.nabble.com/how-to-get-the-annotations-with-the-methods-in-stead-of-with-the-fields--tp26529506p26530937.html&lt;/a&gt;&lt;br&gt;


Sent from the &lt;a href=&quot;http://java.net&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;java.net&lt;/a&gt; - jaxb users mailing list archive at Nabble.com.&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
---------------------------------------------------------------------&lt;br&gt;
To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26531349&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-unsubscribe@...&lt;/a&gt;&lt;br&gt;
For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26531349&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-help@...&lt;/a&gt;&lt;br&gt;
&lt;br&gt;
&lt;/font&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;br&gt;
</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/how-to-get-the-annotations-with-the-methods-in-stead-of-with-the-fields--tp26529506p26531349.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26530993</id>
	<title>Re: Marshal to unqualified form?</title>
	<published>2009-11-26T07:24:56Z</published>
	<updated>2009-11-26T07:24:56Z</updated>
	<author>
		<name>Wolfgang Laun-2</name>
	</author>
	<content type="html">On Thu, Nov 26, 2009 at 3:15 PM,  &lt;span dir=&quot;ltr&quot;&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26530993&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;david@...&lt;/a&gt;&amp;gt;&lt;/span&gt; wrote:&lt;br&gt;&lt;div class=&quot;gmail_quote&quot;&gt;&lt;blockquote class=&quot;gmail_quote&quot; style=&quot;border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;&quot;&gt;
Hi!&lt;br&gt;
&lt;br&gt;
I have a schema (a SEPA PACS002 one) which is defined as elementFormDefault=&amp;quot;qualified&amp;quot;&lt;br&gt;
&lt;br&gt;
Hence when I marshal and object instance to XML all the elements are qualified with a namespace prefix. &lt;br&gt;&lt;/blockquote&gt;&lt;blockquote class=&quot;gmail_quote&quot; style=&quot;border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;&quot;&gt;

Do I have to write a NamespacePrefixFormatter to get them unqialified? I cannot seem to find any options for the Marshaller to get this OOTB.&lt;br&gt;
&lt;br&gt;
The other alternative of course, is to change the elementQualification in the schema - but as these are external I&amp;#39;d rather try to avoid that ( and it would be nice to control it at runtime - to be able to support both forms if neccessary).&lt;br&gt;

&lt;br&gt;&lt;/blockquote&gt;&lt;div&gt;Does this change really remove the NS prefixes from the marshalled XML?&lt;br&gt;&lt;br&gt;If not, please post the &amp;lt;xs:schema&amp;gt; element in full.&lt;br&gt;-W&lt;br&gt; &lt;/div&gt;&lt;blockquote class=&quot;gmail_quote&quot; style=&quot;border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;&quot;&gt;

&lt;br&gt;
&lt;br&gt;
--&lt;br&gt;
David J. M. Karlsen - +47 90 68 22 43&lt;br&gt;
&lt;a href=&quot;http://www.davidkarlsen.com&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://www.davidkarlsen.com&lt;/a&gt;&lt;br&gt;
&lt;a href=&quot;http://mp3.davidkarlsen.com&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://mp3.davidkarlsen.com&lt;/a&gt;&lt;br&gt;
Sent from my bog-standard SMTP client&lt;br&gt;
&lt;br&gt;
---------------------------------------------------------------------&lt;br&gt;
To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26530993&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-unsubscribe@...&lt;/a&gt;&lt;br&gt;
For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26530993&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-help@...&lt;/a&gt;&lt;br&gt;
&lt;br&gt;
&lt;/blockquote&gt;&lt;/div&gt;&lt;br&gt;
</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Marshal-to-unqualified-form--tp26530045p26530993.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26530937</id>
	<title>Re: how to get the annotations with the methods in stead of with the  fields?</title>
	<published>2009-11-26T07:21:31Z</published>
	<updated>2009-11-26T07:21:31Z</updated>
	<author>
		<name>xtien</name>
	</author>
	<content type="html">&lt;br&gt;&lt;blockquote class=&quot;quote light-black dark-border-color&quot;&gt;&lt;div class=&quot;quote light-border-color&quot;&gt;
&lt;div class=&quot;quote-author&quot; style=&quot;font-weight: bold;&quot;&gt;Wolfgang Laun-2 wrote:&lt;/div&gt;
&lt;div class=&quot;quote-message&quot;&gt;On Thu, Nov 26, 2009 at 2:34 PM, xtien &amp;lt;christine@christine.nl&amp;gt; wrote:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; The Jaxb Eclipse plugin generates @XmlElement annotations with the field
&lt;br&gt;&amp;gt; names. In my app, it would be more convenient to have the annotations with
&lt;br&gt;&amp;gt; the getter.
&lt;br&gt;&lt;br&gt;Why? Perhaps you post what you want to achieve.
&lt;/div&gt;
&lt;/div&gt;&lt;/blockquote&gt;
Does it matter?
&lt;br&gt;&lt;br&gt;In my code at some point I have a getter method. The code invokes the method on a class. With this invocation, the code needs the name of the element that's in the information from the XmlElement. If the naming of methods and fields were standard, I could simply get the annotation from the field by creating the field name from the getter name and get the fields annotation. However, the classes are genereated based on xml from a system that does not conform to standard field names. I am not in control of that system. It's hard to create a field name from a getter name, so that's why it would be convenient to have the annotation with the getter.
&lt;br&gt;Actually, all I want to do is retrieve the original element name in a piece of code where I have the getter method but not the field that it goes with.
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/how-to-get-the-annotations-with-the-methods-in-stead-of-with-the-fields--tp26529506p26530937.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26530616</id>
	<title>Re: Mixing schema-derived and own annotation defined types in a  JaxbContext</title>
	<published>2009-11-26T06:58:13Z</published>
	<updated>2009-11-26T06:58:13Z</updated>
	<author>
		<name>Wolfgang Laun-2</name>
	</author>
	<content type="html">&lt;br&gt;&lt;br&gt;&lt;div class=&quot;gmail_quote&quot;&gt;On Thu, Nov 26, 2009 at 3:10 PM,  &lt;span dir=&quot;ltr&quot;&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26530616&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;david@...&lt;/a&gt;&amp;gt;&lt;/span&gt; wrote:&lt;br&gt;&lt;blockquote class=&quot;gmail_quote&quot; style=&quot;border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;&quot;&gt;
On Thu, 26 Nov 2009, Wolfgang Laun wrote:&lt;br&gt;
&lt;br&gt;
&lt;blockquote class=&quot;gmail_quote&quot; style=&quot;border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;&quot;&gt;
Probably with the message &amp;quot;...doesnt contain ObjectFactory.class or&lt;br&gt;
jaxb.index&amp;quot; (which you might have told us). See the JAXB Tutorial section on&lt;br&gt;
JAXBContext&amp;lt;&lt;a href=&quot;https://jaxb.dev.java.net/tutorial/section_3_5-The-JAXB-Context.html#The%20JAXB%20Context&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;https://jaxb.dev.java.net/tutorial/section_3_5-The-JAXB-Context.html#The%20JAXB%20Context&lt;/a&gt;&amp;gt;&lt;br&gt;

.&lt;br&gt;
&lt;/blockquote&gt;
&lt;br&gt;
OK - so this confirms my suspicion.&lt;br&gt;
Would it be possible to enhance JAXB with a new signature, giving both context paths (for schema derived classes (which are also annotated by th eway), as well as a vararg classes argument for the homemade ones?&lt;div&gt;&lt;div&gt;
&lt;/div&gt;&lt;div class=&quot;h5&quot;&gt;&lt;br&gt;&lt;/div&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;div&gt;You can always request an enhancement.&lt;br&gt;&lt;br&gt;But, given that it is so simple to write a jaxb.index file, you might as well do that, and specify two (or more) package names.&lt;br&gt;
&lt;br&gt;-W&lt;br&gt;&lt;br&gt;&lt;br&gt; &lt;/div&gt;&lt;blockquote class=&quot;gmail_quote&quot; style=&quot;border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;&quot;&gt;&lt;div&gt;&lt;div class=&quot;h5&quot;&gt;
&lt;br&gt;
--&lt;br&gt;
David J. M. Karlsen - +47 90 68 22 43&lt;br&gt;
&lt;a href=&quot;http://www.davidkarlsen.com&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://www.davidkarlsen.com&lt;/a&gt;&lt;br&gt;
&lt;a href=&quot;http://mp3.davidkarlsen.com&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://mp3.davidkarlsen.com&lt;/a&gt;&lt;br&gt;
Sent from my bog-standard SMTP client&lt;br&gt;
&lt;br&gt;
---------------------------------------------------------------------&lt;br&gt;
To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26530616&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-unsubscribe@...&lt;/a&gt;&lt;br&gt;
For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26530616&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-help@...&lt;/a&gt;&lt;br&gt;
&lt;br&gt;
&lt;/div&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;br&gt;
</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Mixing-schema-derived-and-own-annotation-defined-types-in-a-JaxbContext-tp26522796p26530616.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26530560</id>
	<title>Re: how to get the annotations with the methods in stead of with the  fields?</title>
	<published>2009-11-26T06:54:54Z</published>
	<updated>2009-11-26T06:54:54Z</updated>
	<author>
		<name>Wolfgang Laun-2</name>
	</author>
	<content type="html">&lt;br&gt;&lt;br&gt;&lt;div class=&quot;gmail_quote&quot;&gt;On Thu, Nov 26, 2009 at 2:34 PM, xtien &lt;span dir=&quot;ltr&quot;&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26530560&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;christine@...&lt;/a&gt;&amp;gt;&lt;/span&gt; wrote:&lt;br&gt;&lt;blockquote class=&quot;gmail_quote&quot; style=&quot;border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;&quot;&gt;
&lt;br&gt;
The Jaxb Eclipse plugin generates @XmlElement annotations with the field&lt;br&gt;
names. In my app, it would be more convenient to have the annotations with&lt;br&gt;
the getter.&lt;/blockquote&gt;&lt;div&gt;&lt;br&gt;Why? Perhaps you post what you want to achieve.&lt;br&gt; &lt;/div&gt;&lt;blockquote class=&quot;gmail_quote&quot; style=&quot;border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;&quot;&gt;
 I have seen an example where the annotation is with the getter.&lt;br&gt;&lt;/blockquote&gt;&lt;div&gt;&lt;br&gt;This was probably coded by hand.&lt;br&gt;-W&lt;br&gt; &lt;/div&gt;&lt;blockquote class=&quot;gmail_quote&quot; style=&quot;border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;&quot;&gt;

How do I make Jaxb put annotations with getters rather than with fields?&lt;br&gt; 
&lt;br&gt;&lt;/blockquote&gt;&lt;blockquote class=&quot;gmail_quote&quot; style=&quot;border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;&quot;&gt;
Thanks :-)&lt;br&gt;
&lt;font color=&quot;#888888&quot;&gt;&lt;br&gt;
--&lt;br&gt;
View this message in context: &lt;a href=&quot;http://old.nabble.com/how-to-get-the-annotations-with-the-methods-in-stead-of-with-the-fields--tp26529506p26529506.html&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://old.nabble.com/how-to-get-the-annotations-with-the-methods-in-stead-of-with-the-fields--tp26529506p26529506.html&lt;/a&gt;&lt;br&gt;

Sent from the &lt;a href=&quot;http://java.net&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;java.net&lt;/a&gt; - jaxb users mailing list archive at Nabble.com.&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
---------------------------------------------------------------------&lt;br&gt;
To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26530560&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-unsubscribe@...&lt;/a&gt;&lt;br&gt;
For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26530560&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-help@...&lt;/a&gt;&lt;br&gt;
&lt;br&gt;
&lt;/font&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;br&gt;
</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/how-to-get-the-annotations-with-the-methods-in-stead-of-with-the-fields--tp26529506p26530560.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26530045</id>
	<title>Marshal to unqualified form?</title>
	<published>2009-11-26T06:15:07Z</published>
	<updated>2009-11-26T06:15:07Z</updated>
	<author>
		<name>davidkarlsen</name>
	</author>
	<content type="html">Hi!
&lt;br&gt;&lt;br&gt;I have a schema (a SEPA PACS002 one) which is defined as 
&lt;br&gt;elementFormDefault=&amp;quot;qualified&amp;quot;
&lt;br&gt;&lt;br&gt;Hence when I marshal and object instance to XML all the elements are 
&lt;br&gt;qualified with a namespace prefix.
&lt;br&gt;Do I have to write a NamespacePrefixFormatter to get them unqialified? I 
&lt;br&gt;cannot seem to find any options for the Marshaller to get this OOTB.
&lt;br&gt;&lt;br&gt;The other alternative of course, is to change the 
&lt;br&gt;elementQualification in the schema - but as these are external I'd rather 
&lt;br&gt;try to avoid that ( and it would be nice to control it at runtime - to be 
&lt;br&gt;able to support both forms if neccessary).
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;--
&lt;br&gt;David J. M. Karlsen - +47 90 68 22 43
&lt;br&gt;&lt;a href=&quot;http://www.davidkarlsen.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.davidkarlsen.com&lt;/a&gt;&lt;br&gt;&lt;a href=&quot;http://mp3.davidkarlsen.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://mp3.davidkarlsen.com&lt;/a&gt;&lt;br&gt;Sent from my bog-standard SMTP client
&lt;br&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26530045&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-unsubscribe@...&lt;/a&gt;
&lt;br&gt;For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26530045&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-help@...&lt;/a&gt;
&lt;br&gt;&lt;br&gt;&lt;div class=&quot;signature&quot;&gt;&lt;a href=&quot;http://www.davidkarlsen.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.davidkarlsen.com&lt;/a&gt;&lt;/div&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Marshal-to-unqualified-form--tp26530045p26530045.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26529991</id>
	<title>Re: Mixing schema-derived and own annotation defined types in a  JaxbContext</title>
	<published>2009-11-26T06:10:56Z</published>
	<updated>2009-11-26T06:10:56Z</updated>
	<author>
		<name>davidkarlsen</name>
	</author>
	<content type="html">On Thu, 26 Nov 2009, Wolfgang Laun wrote:
&lt;br&gt;&lt;br&gt;&amp;gt; Probably with the message &amp;quot;...doesnt contain ObjectFactory.class or
&lt;br&gt;&amp;gt; jaxb.index&amp;quot; (which you might have told us). See the JAXB Tutorial section on
&lt;br&gt;&amp;gt; JAXBContext&amp;lt;&lt;a href=&quot;https://jaxb.dev.java.net/tutorial/section_3_5-The-JAXB-Context.html#The%20JAXB%20Context&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://jaxb.dev.java.net/tutorial/section_3_5-The-JAXB-Context.html#The%20JAXB%20Context&lt;/a&gt;&amp;gt;
&lt;br&gt;&amp;gt; .
&lt;br&gt;&lt;br&gt;OK - so this confirms my suspicion.
&lt;br&gt;Would it be possible to enhance JAXB with a new signature, giving both 
&lt;br&gt;context paths (for schema derived classes (which are also annotated by th 
&lt;br&gt;eway), as well as a vararg classes argument for the homemade ones?
&lt;br&gt;&lt;br&gt;--
&lt;br&gt;David J. M. Karlsen - +47 90 68 22 43
&lt;br&gt;&lt;a href=&quot;http://www.davidkarlsen.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.davidkarlsen.com&lt;/a&gt;&lt;br&gt;&lt;a href=&quot;http://mp3.davidkarlsen.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://mp3.davidkarlsen.com&lt;/a&gt;&lt;br&gt;Sent from my bog-standard SMTP client
&lt;br&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26529991&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-unsubscribe@...&lt;/a&gt;
&lt;br&gt;For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26529991&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-help@...&lt;/a&gt;
&lt;br&gt;&lt;br&gt;&lt;div class=&quot;signature&quot;&gt;&lt;a href=&quot;http://www.davidkarlsen.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.davidkarlsen.com&lt;/a&gt;&lt;/div&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Mixing-schema-derived-and-own-annotation-defined-types-in-a-JaxbContext-tp26522796p26529991.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26529506</id>
	<title>how to get the annotations with the methods in stead of with the fields?</title>
	<published>2009-11-26T05:34:41Z</published>
	<updated>2009-11-26T05:34:41Z</updated>
	<author>
		<name>xtien</name>
	</author>
	<content type="html">The Jaxb Eclipse plugin generates @XmlElement annotations with the field names. In my app, it would be more convenient to have the annotations with the getter. I have seen an example where the annotation is with the getter. How do I make Jaxb put annotations with getters rather than with fields?
&lt;br&gt;&lt;br&gt;Thanks :-)
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/how-to-get-the-annotations-with-the-methods-in-stead-of-with-the-fields--tp26529506p26529506.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26526096</id>
	<title>Re: Changing access modifiers of generated classes</title>
	<published>2009-11-26T00:41:37Z</published>
	<updated>2009-11-26T00:41:37Z</updated>
	<author>
		<name>Wolfgang Laun-2</name>
	</author>
	<content type="html">On Wed, Nov 25, 2009 at 11:11 PM, jurgen quipere &lt;span dir=&quot;ltr&quot;&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26526096&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;jquipere@...&lt;/a&gt;&amp;gt;&lt;/span&gt; wrote:&lt;br&gt;&lt;div class=&quot;gmail_quote&quot;&gt;&lt;blockquote class=&quot;gmail_quote&quot; style=&quot;border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;&quot;&gt;




&lt;div&gt;
Hi,&lt;br&gt;&lt;br&gt;Is it possible to change the access modifier of a generated class from public to none? Can&amp;#39;t find out how to do this in a plugin. &lt;br&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;div&gt;&lt;br&gt;Perhaps a simple sed script would be adequate, e.g., for modifying just the setters:&lt;br&gt;
&lt;br&gt;   sed -e &amp;#39;/    public void set/s/public //&amp;#39; SomeClass.Java&lt;br&gt;&lt;br&gt;Plus a little shell glue to handle file copying.&lt;br&gt;&lt;br&gt;-W&lt;br&gt;&lt;br&gt;&lt;/div&gt;&lt;/div&gt;&lt;br&gt;
</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Changing-access-modifiers-of-generated-classes-tp26521171p26526096.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26525994</id>
	<title>Re: Mixing schema-derived and own annotation defined types in a  JaxbContext</title>
	<published>2009-11-26T00:33:59Z</published>
	<updated>2009-11-26T00:33:59Z</updated>
	<author>
		<name>Wolfgang Laun-2</name>
	</author>
	<content type="html">Probably with the message &amp;quot;...doesnt contain ObjectFactory.class or jaxb.index&amp;quot; (which you might have told us). See the &lt;a href=&quot;https://jaxb.dev.java.net/tutorial/section_3_5-The-JAXB-Context.html#The%20JAXB%20Context&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;JAXB Tutorial section on JAXBContext&lt;/a&gt;.&lt;br&gt;
&lt;br&gt;-W&lt;br&gt;&lt;br&gt;&lt;br&gt;On Thu, Nov 26, 2009 at 1:40 AM, David J. M. Karlsen &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26525994&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;david@...&lt;/a&gt;&amp;gt; wrote:&lt;br&gt;&amp;gt; Hi!&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; I have classes which were generated by  XJC from and XSD, as well as a few&lt;br&gt;
&amp;gt; homebrew classes/types, which were defined with annotations, like this:&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; package jaxbPoc.client;&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; import javax.xml.bind.annotation.XmlAccessType;&lt;br&gt;&amp;gt; import javax.xml.bind.annotation.XmlAccessorType;&lt;br&gt;
&amp;gt; import javax.xml.bind.annotation.XmlElement;&lt;br&gt;&amp;gt; import javax.xml.bind.annotation.XmlRootElement;&lt;br&gt;&amp;gt; import javax.xml.bind.annotation.XmlType;&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; @XmlRootElement( name=&amp;quot;someElementName&amp;quot;, namespace=&amp;quot;&amp;quot; )&lt;br&gt;
&amp;gt; @XmlAccessorType( XmlAccessType.FIELD )&lt;br&gt;&amp;gt; @XmlType&lt;br&gt;&amp;gt; public class SomeHomeBrewStructure&lt;br&gt;&amp;gt; {&lt;br&gt;&amp;gt;   @XmlElement( name=&amp;quot;TheElementName&amp;quot; )&lt;br&gt;&amp;gt;   private String someVar = &amp;quot;theElementValue&amp;quot;;&lt;br&gt;
&amp;gt;&lt;br&gt;&amp;gt; }&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; The generated ones are in jaxbCode.generated&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; This works:&lt;br&gt;&amp;gt; jc = JAXBContext.newInstance(&amp;quot;jaxbPoc.generatedCode&amp;quot;);&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; and this works:&lt;br&gt;&amp;gt; jc = JAXBContext.newInstance(jaxbPoc.client.SomeHomeBrewStructure.class);&lt;br&gt;
&amp;gt;&lt;br&gt;&amp;gt; but this will not work:&lt;br&gt;&amp;gt; JAXBContext.newInstance(&amp;quot;jaxbPoc.generatedCode:jaxbPoc.client&amp;quot;);&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; which is very un-handy.&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; Is there no way to define them both in the one context together?&lt;br&gt;
&amp;gt;&lt;br&gt;&amp;gt; --&lt;br&gt;&amp;gt; --&lt;br&gt;&amp;gt; David J. M. Karlsen - +47 90 68 22 43&lt;br&gt;&amp;gt; &lt;a href=&quot;http://www.davidkarlsen.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.davidkarlsen.com&lt;/a&gt;&lt;br&gt;&amp;gt; &lt;a href=&quot;http://mp3.davidkarlsen.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://mp3.davidkarlsen.com&lt;/a&gt;&lt;br&gt;
&amp;gt; Sent from my bog-standard SMTP client&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; ---------------------------------------------------------------------&lt;br&gt;&amp;gt; To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26525994&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-unsubscribe@...&lt;/a&gt;&lt;br&gt;
&amp;gt; For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26525994&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-help@...&lt;/a&gt;&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt;&lt;br&gt;&lt;br&gt;
</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Mixing-schema-derived-and-own-annotation-defined-types-in-a-JaxbContext-tp26522796p26525994.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26525776</id>
	<title>Re: XJC and &quot;choice&quot; element.</title>
	<published>2009-11-26T00:12:57Z</published>
	<updated>2009-11-26T00:12:57Z</updated>
	<author>
		<name>Wolfgang Laun-2</name>
	</author>
	<content type="html">On Wed, Nov 25, 2009 at 2:36 PM, Wolfgang Laun &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26525776&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;wolfgang.laun@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt; On Wed, Nov 25, 2009 at 2:26 PM, Pavel Bucek &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26525776&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Pavel.Bucek@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; reason: you are using jaxb-api v2.1 from jdk 1.6
&lt;br&gt;&amp;gt;&amp;gt; needed action: copy jaxb-api.jar (v2.2!) to jdk's endorsed dir
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Which, to save you the bother of googling, is
&lt;br&gt;&amp;gt; $JAVA_HOME/jre/lib/endorsed/, needing to be created.
&lt;br&gt;&lt;br&gt;And copy &amp;nbsp;jaxb-impl.jar as well, or else execution fails with
&lt;br&gt;&amp;nbsp; &amp;nbsp;java.lang.ClassNotFoundException: com.sun.xml.bind.v2.ContextFactory
&lt;br&gt;&lt;br&gt;-W
&lt;br&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26525776&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-unsubscribe@...&lt;/a&gt;
&lt;br&gt;For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26525776&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-help@...&lt;/a&gt;
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/XJC-and-%22choice%22-element.-tp26461900p26525776.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26522796</id>
	<title>Mixing schema-derived and own annotation defined types in a JaxbContext</title>
	<published>2009-11-25T16:40:41Z</published>
	<updated>2009-11-25T16:40:41Z</updated>
	<author>
		<name>davidkarlsen</name>
	</author>
	<content type="html">Hi!
&lt;br&gt;&lt;br&gt;I have classes which were generated by &amp;nbsp;XJC from and XSD, as well as a 
&lt;br&gt;few homebrew classes/types, which were defined with annotations, like this:
&lt;br&gt;&lt;br&gt;package jaxbPoc.client;
&lt;br&gt;&lt;br&gt;import javax.xml.bind.annotation.XmlAccessType;
&lt;br&gt;import javax.xml.bind.annotation.XmlAccessorType;
&lt;br&gt;import javax.xml.bind.annotation.XmlElement;
&lt;br&gt;import javax.xml.bind.annotation.XmlRootElement;
&lt;br&gt;import javax.xml.bind.annotation.XmlType;
&lt;br&gt;&lt;br&gt;&lt;br&gt;@XmlRootElement( name=&amp;quot;someElementName&amp;quot;, namespace=&amp;quot;&amp;quot; )
&lt;br&gt;@XmlAccessorType( XmlAccessType.FIELD )
&lt;br&gt;@XmlType
&lt;br&gt;public class SomeHomeBrewStructure
&lt;br&gt;{
&lt;br&gt;&amp;nbsp; &amp;nbsp; @XmlElement( name=&amp;quot;TheElementName&amp;quot; )
&lt;br&gt;&amp;nbsp; &amp;nbsp; private String someVar = &amp;quot;theElementValue&amp;quot;;
&lt;br&gt;&lt;br&gt;}
&lt;br&gt;&lt;br&gt;The generated ones are in jaxbCode.generated
&lt;br&gt;&lt;br&gt;This works:
&lt;br&gt;jc = JAXBContext.newInstance(&amp;quot;jaxbPoc.generatedCode&amp;quot;);
&lt;br&gt;&lt;br&gt;and this works:
&lt;br&gt;jc = JAXBContext.newInstance(jaxbPoc.client.SomeHomeBrewStructure.class);
&lt;br&gt;&lt;br&gt;but this will not work:
&lt;br&gt;JAXBContext.newInstance(&amp;quot;jaxbPoc.generatedCode:jaxbPoc.client&amp;quot;);
&lt;br&gt;&lt;br&gt;which is very un-handy.
&lt;br&gt;&lt;br&gt;Is there no way to define them both in the one context together?
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;--
&lt;br&gt;David J. M. Karlsen - +47 90 68 22 43
&lt;br&gt;&lt;a href=&quot;http://www.davidkarlsen.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.davidkarlsen.com&lt;/a&gt;&lt;br&gt;&lt;a href=&quot;http://mp3.davidkarlsen.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://mp3.davidkarlsen.com&lt;/a&gt;&lt;br&gt;Sent from my bog-standard SMTP client
&lt;br&gt;&lt;br&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26522796&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-unsubscribe@...&lt;/a&gt;
&lt;br&gt;For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26522796&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-help@...&lt;/a&gt;
&lt;br&gt;&lt;br&gt;&lt;div class=&quot;signature&quot;&gt;&lt;a href=&quot;http://www.davidkarlsen.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.davidkarlsen.com&lt;/a&gt;&lt;/div&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Mixing-schema-derived-and-own-annotation-defined-types-in-a-JaxbContext-tp26522796p26522796.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26521171</id>
	<title>Changing access modifiers of generated classes</title>
	<published>2009-11-25T14:11:46Z</published>
	<updated>2009-11-25T14:11:46Z</updated>
	<author>
		<name>quipere</name>
	</author>
	<content type="html">&lt;html&gt;
&lt;head&gt;

&lt;/head&gt;
&lt;body class='hmmessage'&gt;
Hi,&lt;br&gt;&lt;br&gt;Is it possible to change the access modifier of a generated class from public to none? Can't find out how to do this in a plugin. &lt;br&gt; 		 	   		  &lt;br /&gt;&lt;hr /&gt;Express yourself instantly with MSN Messenger! &lt;a href='http://clk.atdmt.com/AVE/go/onm00200471ave/direct/01/' target='_new' rel=&quot;nofollow&quot;&gt;MSN Messenger&lt;/a&gt;&lt;/body&gt;
&lt;/html&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Changing-access-modifiers-of-generated-classes-tp26521171p26521171.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26512725</id>
	<title>Re: XJC and &quot;choice&quot; element.</title>
	<published>2009-11-25T05:36:09Z</published>
	<updated>2009-11-25T05:36:09Z</updated>
	<author>
		<name>Wolfgang Laun-2</name>
	</author>
	<content type="html">On Wed, Nov 25, 2009 at 2:26 PM, Pavel Bucek &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26512725&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Pavel.Bucek@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Hello,
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; already explained in the issue comment.. see
&lt;br&gt;&amp;gt; &lt;a href=&quot;https://jaxb.dev.java.net/issues/show_bug.cgi?id=721&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://jaxb.dev.java.net/issues/show_bug.cgi?id=721&lt;/a&gt;.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; there is a simple reason
&lt;br&gt;&lt;br&gt;Ha!
&lt;br&gt;&lt;br&gt;&amp;gt; and a simple way how to get this working:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; reason: you are using jaxb-api v2.1 from jdk 1.6
&lt;br&gt;&amp;gt; needed action: copy jaxb-api.jar (v2.2!) to jdk's endorsed dir
&lt;br&gt;&lt;br&gt;Which, to save you the bother of googling, is
&lt;br&gt;$JAVA_HOME/jre/lib/endorsed/, needing to be created.
&lt;br&gt;&lt;br&gt;FYI, I have also urged for clarifying info in JAXB's docs/ReleaseNotes.html
&lt;br&gt;&lt;br&gt;-W
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; regards,
&lt;br&gt;&amp;gt; Pavel
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Wolfgang Laun wrote:
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; John,
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; the schema with 0/unboudned compiles without a hitch with any regular
&lt;br&gt;&amp;gt;&amp;gt; xjc from JAXB v 2.1.8 up to 2.1.11 and the one distributed with JDK
&lt;br&gt;&amp;gt;&amp;gt; &amp;quot;1.6.0_0&amp;quot;. It fails with xjc JAXB 2.2 &amp;quot;Early Access&amp;quot;. I'll submit an
&lt;br&gt;&amp;gt;&amp;gt; issue.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; -W
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; On Tue, Nov 24, 2009 at 7:45 PM, John Leonard &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26512725&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;jleonard.20081@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; Wolfgang Laun wrote:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; This does not depend on &amp;lt;choice...&amp;gt; alone. Can you post a full .xsd
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; producing the exception?
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; -W
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; On 11/22/09, John Leonard &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26512725&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;jleonard.20081@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Does JAXB understand the following use of the &amp;quot;choice&amp;quot; element?
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;               &amp;lt;choice minOccurs=&amp;quot;0&amp;quot; maxOccurs=&amp;quot;unbounded&amp;quot;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;                   &amp;lt;element...
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;                   &amp;lt;element...
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;                   ...
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;               &amp;lt;/choice&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Here is the output of XJC when I run it from the command line on a file
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; containing such code:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; parsing a schema...
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; compiling a schema...
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; [INFO] generating code
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; unknown location
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Exception in thread &amp;quot;main&amp;quot;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; java.lang.reflect.UndeclaredThrowableException
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;       at $Proxy7.required(Unknown Source)
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;       at
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; com.sun.tools.xjc.generator.bean.field.AbstractField.annotateReferenc
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; e(AbstractField.java:197)
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;       at
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; com.sun.tools.xjc.generator.bean.field.AbstractField.annotate(Abstrac
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; tField.java:156)
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;       at
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; com.sun.tools.xjc.generator.bean.field.AbstractListField.generate(Abs
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; tractListField.java:124)
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;       at
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; com.sun.tools.xjc.generator.bean.field.UntypedListField.&amp;lt;init&amp;gt;(Untype
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; dListField.java:107)
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;       at
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; com.sun.tools.xjc.generator.bean.field.UntypedListFieldRenderer.gener
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; ate(UntypedListFieldRenderer.java:72)
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;       at
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; com.sun.tools.xjc.generator.bean.field.DefaultFieldRenderer.generate(
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; DefaultFieldRenderer.java:79)
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;       at
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; com.sun.tools.xjc.generator.bean.BeanGenerator.generateFieldDecl(Bean
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Generator.java:747)
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;       at
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; com.sun.tools.xjc.generator.bean.BeanGenerator.generateClassBody(Bean
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Generator.java:535)
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;       at
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; com.sun.tools.xjc.generator.bean.BeanGenerator.&amp;lt;init&amp;gt;(BeanGenerator.j
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; ava:235)
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;       at
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; com.sun.tools.xjc.generator.bean.BeanGenerator.generate(BeanGenerator
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; .java:175)
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;       at com.sun.tools.xjc.model.Model.generateCode(Model.java:286)
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;       at com.sun.tools.xjc.Driver.run(Driver.java:343)
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;       at com.sun.tools.xjc.Driver.run(Driver.java:191)
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;       at com.sun.tools.xjc.Driver._main(Driver.java:116)
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;       at com.sun.tools.xjc.Driver.access$000(Driver.java:74)
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;       at com.sun.tools.xjc.Driver$1.run(Driver.java:96)
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Caused by: java.lang.NoSuchMethodException:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; javax.xml.bind.annotation.XmlElement
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Ref.required()
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;       at java.lang.Class.getDeclaredMethod(Unknown Source)
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;       at
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; com.sun.codemodel.TypedAnnotationWriter.invoke(TypedAnnotationWriter.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; java:107)
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;       ... 17 more
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Thanks,
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; John L.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; ---------------------------------------------------------------------
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26512725&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-unsubscribe@...&lt;/a&gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26512725&amp;i=4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-help@...&lt;/a&gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; ---------------------------------------------------------------------
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26512725&amp;i=5&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-unsubscribe@...&lt;/a&gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26512725&amp;i=6&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-help@...&lt;/a&gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; File &amp;quot;xjc_compiles.xsd&amp;quot;:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;lt;schema
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;  xmlns=&amp;quot;&lt;a href=&quot;http://www.w3.org/2001/XMLSchema&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.w3.org/2001/XMLSchema&lt;/a&gt;&amp;quot;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;  targetNamespace=&amp;quot;&lt;a href=&quot;http://www.sudokucaptain.com/CommandString111609&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.sudokucaptain.com/CommandString111609&lt;/a&gt;&amp;quot;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;  xmlns:cs=&amp;quot;&lt;a href=&quot;http://www.sudokucaptain.com/CommandString111609&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.sudokucaptain.com/CommandString111609&lt;/a&gt;&amp;quot;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;  &amp;lt;element name=&amp;quot;TestElement&amp;quot;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;      &amp;lt;complexType&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;          &amp;lt;choice&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;              &amp;lt;element name=&amp;quot;element1&amp;quot; /&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;              &amp;lt;element name=&amp;quot;element2&amp;quot; /&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;          &amp;lt;/choice&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;      &amp;lt;/complexType&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;  &amp;lt;/element&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;lt;/schema&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; File &amp;quot;xjc_doesnt_compile.xsd&amp;quot;:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;lt;schema
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;  xmlns=&amp;quot;&lt;a href=&quot;http://www.w3.org/2001/XMLSchema&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.w3.org/2001/XMLSchema&lt;/a&gt;&amp;quot;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;  targetNamespace=&amp;quot;&lt;a href=&quot;http://www.sudokucaptain.com/CommandString111609&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.sudokucaptain.com/CommandString111609&lt;/a&gt;&amp;quot;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;  xmlns:cs=&amp;quot;&lt;a href=&quot;http://www.sudokucaptain.com/CommandString111609&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.sudokucaptain.com/CommandString111609&lt;/a&gt;&amp;quot;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;  &amp;lt;element name=&amp;quot;TestElement&amp;quot;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;      &amp;lt;complexType&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;          &amp;lt;choice minOccurs=&amp;quot;0&amp;quot; maxOccurs=&amp;quot;unbounded&amp;quot;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;              &amp;lt;element name=&amp;quot;element1&amp;quot; /&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;              &amp;lt;element name=&amp;quot;element2&amp;quot; /&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;          &amp;lt;/choice&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;      &amp;lt;/complexType&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;  &amp;lt;/element&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;lt;/schema&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; The only difference between these two files is this line:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;          &amp;lt;choice minOccurs=&amp;quot;0&amp;quot; maxOccurs=&amp;quot;unbounded&amp;quot;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; I think JAXB would have a hard time working with a List containing
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; unrelated
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; types. Their only common ancestor would be &amp;quot;Object&amp;quot;. It would still be
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; nice,
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; however, if this could be done as it would offer an alternative to
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; creating
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; large groups of related types and substitution groups.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; John L.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; ---------------------------------------------------------------------
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26512725&amp;i=7&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-unsubscribe@...&lt;/a&gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26512725&amp;i=8&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-help@...&lt;/a&gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; ---------------------------------------------------------------------
&lt;br&gt;&amp;gt;&amp;gt; To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26512725&amp;i=9&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-unsubscribe@...&lt;/a&gt;
&lt;br&gt;&amp;gt;&amp;gt; For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26512725&amp;i=10&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-help@...&lt;/a&gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; ---------------------------------------------------------------------
&lt;br&gt;&amp;gt; To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26512725&amp;i=11&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-unsubscribe@...&lt;/a&gt;
&lt;br&gt;&amp;gt; For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26512725&amp;i=12&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-help@...&lt;/a&gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;/div&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26512725&amp;i=13&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-unsubscribe@...&lt;/a&gt;
&lt;br&gt;For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26512725&amp;i=14&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-help@...&lt;/a&gt;
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/XJC-and-%22choice%22-element.-tp26461900p26512725.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26512609</id>
	<title>Re: XJC and &quot;choice&quot; element.</title>
	<published>2009-11-25T05:26:49Z</published>
	<updated>2009-11-25T05:26:49Z</updated>
	<author>
		<name>Pavel Bucek</name>
	</author>
	<content type="html">&lt;br&gt;Hello,
&lt;br&gt;&lt;br&gt;already explained in the issue comment.. see 
&lt;br&gt;&lt;a href=&quot;https://jaxb.dev.java.net/issues/show_bug.cgi?id=721&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://jaxb.dev.java.net/issues/show_bug.cgi?id=721&lt;/a&gt;.
&lt;br&gt;&lt;br&gt;there is a simple reason and a simple way how to get this working:
&lt;br&gt;&lt;br&gt;reason: you are using jaxb-api v2.1 from jdk 1.6
&lt;br&gt;needed action: copy jaxb-api.jar (v2.2!) to jdk's endorsed dir
&lt;br&gt;&lt;br&gt;regards,
&lt;br&gt;Pavel
&lt;br&gt;&lt;br&gt;&lt;br&gt;Wolfgang Laun wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; John,
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; the schema with 0/unboudned compiles without a hitch with any regular
&lt;br&gt;&amp;gt; xjc from JAXB v 2.1.8 up to 2.1.11 and the one distributed with JDK
&lt;br&gt;&amp;gt; &amp;quot;1.6.0_0&amp;quot;. It fails with xjc JAXB 2.2 &amp;quot;Early Access&amp;quot;. I'll submit an
&lt;br&gt;&amp;gt; issue.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; -W
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; On Tue, Nov 24, 2009 at 7:45 PM, John Leonard &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26512609&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;jleonard.20081@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt; &amp;nbsp; 
&lt;br&gt;&amp;gt;&amp;gt; Wolfgang Laun wrote:
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; This does not depend on &amp;lt;choice...&amp;gt; alone. Can you post a full .xsd
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; producing the exception?
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; -W
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; On 11/22/09, John Leonard &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26512609&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;jleonard.20081@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Does JAXB understand the following use of the &amp;quot;choice&amp;quot; element?
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;choice minOccurs=&amp;quot;0&amp;quot; maxOccurs=&amp;quot;unbounded&amp;quot;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;element...
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;element...
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;...
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;/choice&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Here is the output of XJC when I run it from the command line on a file
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; containing such code:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; parsing a schema...
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; compiling a schema...
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; [INFO] generating code
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; unknown location
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Exception in thread &amp;quot;main&amp;quot; java.lang.reflect.UndeclaredThrowableException
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;at $Proxy7.required(Unknown Source)
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;at
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; com.sun.tools.xjc.generator.bean.field.AbstractField.annotateReferenc
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; e(AbstractField.java:197)
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;at
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; com.sun.tools.xjc.generator.bean.field.AbstractField.annotate(Abstrac
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; tField.java:156)
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;at
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; com.sun.tools.xjc.generator.bean.field.AbstractListField.generate(Abs
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; tractListField.java:124)
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;at
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; com.sun.tools.xjc.generator.bean.field.UntypedListField.&amp;lt;init&amp;gt;(Untype
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; dListField.java:107)
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;at
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; com.sun.tools.xjc.generator.bean.field.UntypedListFieldRenderer.gener
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; ate(UntypedListFieldRenderer.java:72)
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;at
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; com.sun.tools.xjc.generator.bean.field.DefaultFieldRenderer.generate(
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; DefaultFieldRenderer.java:79)
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;at
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; com.sun.tools.xjc.generator.bean.BeanGenerator.generateFieldDecl(Bean
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Generator.java:747)
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;at
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; com.sun.tools.xjc.generator.bean.BeanGenerator.generateClassBody(Bean
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Generator.java:535)
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;at
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; com.sun.tools.xjc.generator.bean.BeanGenerator.&amp;lt;init&amp;gt;(BeanGenerator.j
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; ava:235)
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;at
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; com.sun.tools.xjc.generator.bean.BeanGenerator.generate(BeanGenerator
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; .java:175)
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;at com.sun.tools.xjc.model.Model.generateCode(Model.java:286)
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;at com.sun.tools.xjc.Driver.run(Driver.java:343)
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;at com.sun.tools.xjc.Driver.run(Driver.java:191)
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;at com.sun.tools.xjc.Driver._main(Driver.java:116)
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;at com.sun.tools.xjc.Driver.access$000(Driver.java:74)
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;at com.sun.tools.xjc.Driver$1.run(Driver.java:96)
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Caused by: java.lang.NoSuchMethodException:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; javax.xml.bind.annotation.XmlElement
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Ref.required()
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;at java.lang.Class.getDeclaredMethod(Unknown Source)
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;at
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; com.sun.codemodel.TypedAnnotationWriter.invoke(TypedAnnotationWriter.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; java:107)
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;... 17 more
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Thanks,
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; John L.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; ---------------------------------------------------------------------
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26512609&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-unsubscribe@...&lt;/a&gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26512609&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-help@...&lt;/a&gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; ---------------------------------------------------------------------
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26512609&amp;i=4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-unsubscribe@...&lt;/a&gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26512609&amp;i=5&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-help@...&lt;/a&gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;gt;&amp;gt; File &amp;quot;xjc_compiles.xsd&amp;quot;:
&lt;br&gt;&amp;gt;&amp;gt; &amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;lt;schema
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; xmlns=&amp;quot;&lt;a href=&quot;http://www.w3.org/2001/XMLSchema&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.w3.org/2001/XMLSchema&lt;/a&gt;&amp;quot;
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; targetNamespace=&amp;quot;&lt;a href=&quot;http://www.sudokucaptain.com/CommandString111609&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.sudokucaptain.com/CommandString111609&lt;/a&gt;&amp;quot;
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; xmlns:cs=&amp;quot;&lt;a href=&quot;http://www.sudokucaptain.com/CommandString111609&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.sudokucaptain.com/CommandString111609&lt;/a&gt;&amp;quot;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;lt;element name=&amp;quot;TestElement&amp;quot;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;complexType&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;choice&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;element name=&amp;quot;element1&amp;quot; /&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;element name=&amp;quot;element2&amp;quot; /&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/choice&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/complexType&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;lt;/element&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;lt;/schema&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; File &amp;quot;xjc_doesnt_compile.xsd&amp;quot;:
&lt;br&gt;&amp;gt;&amp;gt; &amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;lt;schema
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; xmlns=&amp;quot;&lt;a href=&quot;http://www.w3.org/2001/XMLSchema&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.w3.org/2001/XMLSchema&lt;/a&gt;&amp;quot;
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; targetNamespace=&amp;quot;&lt;a href=&quot;http://www.sudokucaptain.com/CommandString111609&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.sudokucaptain.com/CommandString111609&lt;/a&gt;&amp;quot;
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; xmlns:cs=&amp;quot;&lt;a href=&quot;http://www.sudokucaptain.com/CommandString111609&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.sudokucaptain.com/CommandString111609&lt;/a&gt;&amp;quot;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;lt;element name=&amp;quot;TestElement&amp;quot;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;complexType&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;choice minOccurs=&amp;quot;0&amp;quot; maxOccurs=&amp;quot;unbounded&amp;quot;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;element name=&amp;quot;element1&amp;quot; /&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;element name=&amp;quot;element2&amp;quot; /&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/choice&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/complexType&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;lt;/element&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;lt;/schema&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; The only difference between these two files is this line:
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;choice minOccurs=&amp;quot;0&amp;quot; maxOccurs=&amp;quot;unbounded&amp;quot;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; I think JAXB would have a hard time working with a List containing unrelated
&lt;br&gt;&amp;gt;&amp;gt; types. Their only common ancestor would be &amp;quot;Object&amp;quot;. It would still be nice,
&lt;br&gt;&amp;gt;&amp;gt; however, if this could be done as it would offer an alternative to creating
&lt;br&gt;&amp;gt;&amp;gt; large groups of related types and substitution groups.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; John L.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; ---------------------------------------------------------------------
&lt;br&gt;&amp;gt;&amp;gt; To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26512609&amp;i=6&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-unsubscribe@...&lt;/a&gt;
&lt;br&gt;&amp;gt;&amp;gt; For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26512609&amp;i=7&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-help@...&lt;/a&gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; ---------------------------------------------------------------------
&lt;br&gt;&amp;gt; To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26512609&amp;i=8&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-unsubscribe@...&lt;/a&gt;
&lt;br&gt;&amp;gt; For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26512609&amp;i=9&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-help@...&lt;/a&gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; 
&lt;/div&gt;&lt;br&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26512609&amp;i=10&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-unsubscribe@...&lt;/a&gt;
&lt;br&gt;For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26512609&amp;i=11&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-help@...&lt;/a&gt;
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/XJC-and-%22choice%22-element.-tp26461900p26512609.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26508811</id>
	<title>Re: XJC and &quot;choice&quot; element.</title>
	<published>2009-11-25T00:03:32Z</published>
	<updated>2009-11-25T00:03:32Z</updated>
	<author>
		<name>Wolfgang Laun-2</name>
	</author>
	<content type="html">John,
&lt;br&gt;&lt;br&gt;the schema with 0/unboudned compiles without a hitch with any regular
&lt;br&gt;xjc from JAXB v 2.1.8 up to 2.1.11 and the one distributed with JDK
&lt;br&gt;&amp;quot;1.6.0_0&amp;quot;. It fails with xjc JAXB 2.2 &amp;quot;Early Access&amp;quot;. I'll submit an
&lt;br&gt;issue.
&lt;br&gt;&lt;br&gt;-W
&lt;br&gt;&lt;br&gt;&lt;br&gt;On Tue, Nov 24, 2009 at 7:45 PM, John Leonard &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26508811&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;jleonard.20081@...&lt;/a&gt;&amp;gt; wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Wolfgang Laun wrote:
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; This does not depend on &amp;lt;choice...&amp;gt; alone. Can you post a full .xsd
&lt;br&gt;&amp;gt;&amp;gt; producing the exception?
&lt;br&gt;&amp;gt;&amp;gt; -W
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; On 11/22/09, John Leonard &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26508811&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;jleonard.20081@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; Does JAXB understand the following use of the &amp;quot;choice&amp;quot; element?
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;                &amp;lt;choice minOccurs=&amp;quot;0&amp;quot; maxOccurs=&amp;quot;unbounded&amp;quot;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;                    &amp;lt;element...
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;                    &amp;lt;element...
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;                    ...
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;                &amp;lt;/choice&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; Here is the output of XJC when I run it from the command line on a file
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; containing such code:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; parsing a schema...
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; compiling a schema...
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; [INFO] generating code
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; unknown location
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; Exception in thread &amp;quot;main&amp;quot; java.lang.reflect.UndeclaredThrowableException
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;        at $Proxy7.required(Unknown Source)
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;        at
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; com.sun.tools.xjc.generator.bean.field.AbstractField.annotateReferenc
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; e(AbstractField.java:197)
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;        at
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; com.sun.tools.xjc.generator.bean.field.AbstractField.annotate(Abstrac
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; tField.java:156)
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;        at
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; com.sun.tools.xjc.generator.bean.field.AbstractListField.generate(Abs
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; tractListField.java:124)
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;        at
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; com.sun.tools.xjc.generator.bean.field.UntypedListField.&amp;lt;init&amp;gt;(Untype
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; dListField.java:107)
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;        at
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; com.sun.tools.xjc.generator.bean.field.UntypedListFieldRenderer.gener
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; ate(UntypedListFieldRenderer.java:72)
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;        at
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; com.sun.tools.xjc.generator.bean.field.DefaultFieldRenderer.generate(
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; DefaultFieldRenderer.java:79)
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;        at
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; com.sun.tools.xjc.generator.bean.BeanGenerator.generateFieldDecl(Bean
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; Generator.java:747)
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;        at
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; com.sun.tools.xjc.generator.bean.BeanGenerator.generateClassBody(Bean
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; Generator.java:535)
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;        at
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; com.sun.tools.xjc.generator.bean.BeanGenerator.&amp;lt;init&amp;gt;(BeanGenerator.j
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; ava:235)
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;        at
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; com.sun.tools.xjc.generator.bean.BeanGenerator.generate(BeanGenerator
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; .java:175)
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;        at com.sun.tools.xjc.model.Model.generateCode(Model.java:286)
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;        at com.sun.tools.xjc.Driver.run(Driver.java:343)
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;        at com.sun.tools.xjc.Driver.run(Driver.java:191)
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;        at com.sun.tools.xjc.Driver._main(Driver.java:116)
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;        at com.sun.tools.xjc.Driver.access$000(Driver.java:74)
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;        at com.sun.tools.xjc.Driver$1.run(Driver.java:96)
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; Caused by: java.lang.NoSuchMethodException:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; javax.xml.bind.annotation.XmlElement
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; Ref.required()
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;        at java.lang.Class.getDeclaredMethod(Unknown Source)
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;        at
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; com.sun.codemodel.TypedAnnotationWriter.invoke(TypedAnnotationWriter.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; java:107)
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;        ... 17 more
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; Thanks,
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; John L.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; ---------------------------------------------------------------------
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26508811&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-unsubscribe@...&lt;/a&gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26508811&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-help@...&lt;/a&gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; ---------------------------------------------------------------------
&lt;br&gt;&amp;gt;&amp;gt; To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26508811&amp;i=4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-unsubscribe@...&lt;/a&gt;
&lt;br&gt;&amp;gt;&amp;gt; For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26508811&amp;i=5&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-help@...&lt;/a&gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; File &amp;quot;xjc_compiles.xsd&amp;quot;:
&lt;br&gt;&amp;gt; &amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;
&lt;br&gt;&amp;gt; &amp;lt;schema
&lt;br&gt;&amp;gt;   xmlns=&amp;quot;&lt;a href=&quot;http://www.w3.org/2001/XMLSchema&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.w3.org/2001/XMLSchema&lt;/a&gt;&amp;quot;
&lt;br&gt;&amp;gt;   targetNamespace=&amp;quot;&lt;a href=&quot;http://www.sudokucaptain.com/CommandString111609&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.sudokucaptain.com/CommandString111609&lt;/a&gt;&amp;quot;
&lt;br&gt;&amp;gt;   xmlns:cs=&amp;quot;&lt;a href=&quot;http://www.sudokucaptain.com/CommandString111609&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.sudokucaptain.com/CommandString111609&lt;/a&gt;&amp;quot;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;   &amp;lt;element name=&amp;quot;TestElement&amp;quot;&amp;gt;
&lt;br&gt;&amp;gt;       &amp;lt;complexType&amp;gt;
&lt;br&gt;&amp;gt;           &amp;lt;choice&amp;gt;
&lt;br&gt;&amp;gt;               &amp;lt;element name=&amp;quot;element1&amp;quot; /&amp;gt;
&lt;br&gt;&amp;gt;               &amp;lt;element name=&amp;quot;element2&amp;quot; /&amp;gt;
&lt;br&gt;&amp;gt;           &amp;lt;/choice&amp;gt;
&lt;br&gt;&amp;gt;       &amp;lt;/complexType&amp;gt;
&lt;br&gt;&amp;gt;   &amp;lt;/element&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;lt;/schema&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; File &amp;quot;xjc_doesnt_compile.xsd&amp;quot;:
&lt;br&gt;&amp;gt; &amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;
&lt;br&gt;&amp;gt; &amp;lt;schema
&lt;br&gt;&amp;gt;   xmlns=&amp;quot;&lt;a href=&quot;http://www.w3.org/2001/XMLSchema&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.w3.org/2001/XMLSchema&lt;/a&gt;&amp;quot;
&lt;br&gt;&amp;gt;   targetNamespace=&amp;quot;&lt;a href=&quot;http://www.sudokucaptain.com/CommandString111609&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.sudokucaptain.com/CommandString111609&lt;/a&gt;&amp;quot;
&lt;br&gt;&amp;gt;   xmlns:cs=&amp;quot;&lt;a href=&quot;http://www.sudokucaptain.com/CommandString111609&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.sudokucaptain.com/CommandString111609&lt;/a&gt;&amp;quot;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;   &amp;lt;element name=&amp;quot;TestElement&amp;quot;&amp;gt;
&lt;br&gt;&amp;gt;       &amp;lt;complexType&amp;gt;
&lt;br&gt;&amp;gt;           &amp;lt;choice minOccurs=&amp;quot;0&amp;quot; maxOccurs=&amp;quot;unbounded&amp;quot;&amp;gt;
&lt;br&gt;&amp;gt;               &amp;lt;element name=&amp;quot;element1&amp;quot; /&amp;gt;
&lt;br&gt;&amp;gt;               &amp;lt;element name=&amp;quot;element2&amp;quot; /&amp;gt;
&lt;br&gt;&amp;gt;           &amp;lt;/choice&amp;gt;
&lt;br&gt;&amp;gt;       &amp;lt;/complexType&amp;gt;
&lt;br&gt;&amp;gt;   &amp;lt;/element&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;lt;/schema&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; The only difference between these two files is this line:
&lt;br&gt;&amp;gt;           &amp;lt;choice minOccurs=&amp;quot;0&amp;quot; maxOccurs=&amp;quot;unbounded&amp;quot;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; I think JAXB would have a hard time working with a List containing unrelated
&lt;br&gt;&amp;gt; types. Their only common ancestor would be &amp;quot;Object&amp;quot;. It would still be nice,
&lt;br&gt;&amp;gt; however, if this could be done as it would offer an alternative to creating
&lt;br&gt;&amp;gt; large groups of related types and substitution groups.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; John L.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; ---------------------------------------------------------------------
&lt;br&gt;&amp;gt; To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26508811&amp;i=6&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-unsubscribe@...&lt;/a&gt;
&lt;br&gt;&amp;gt; For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26508811&amp;i=7&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-help@...&lt;/a&gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;/div&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26508811&amp;i=8&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-unsubscribe@...&lt;/a&gt;
&lt;br&gt;For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26508811&amp;i=9&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-help@...&lt;/a&gt;
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/XJC-and-%22choice%22-element.-tp26461900p26508811.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26501301</id>
	<title>Re: XJC and &quot;choice&quot; element.</title>
	<published>2009-11-24T10:45:45Z</published>
	<updated>2009-11-24T10:45:45Z</updated>
	<author>
		<name>John Leonard-6</name>
	</author>
	<content type="html">Wolfgang Laun wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; This does not depend on &amp;lt;choice...&amp;gt; alone. Can you post a full .xsd
&lt;br&gt;&amp;gt; producing the exception?
&lt;br&gt;&amp;gt; -W
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; On 11/22/09, John Leonard &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26501301&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;jleonard.20081@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt; &amp;nbsp; 
&lt;br&gt;&amp;gt;&amp;gt; Does JAXB understand the following use of the &amp;quot;choice&amp;quot; element?
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;choice minOccurs=&amp;quot;0&amp;quot; maxOccurs=&amp;quot;unbounded&amp;quot;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;element...
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;element...
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ...
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/choice&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Here is the output of XJC when I run it from the command line on a file
&lt;br&gt;&amp;gt;&amp;gt; containing such code:
&lt;br&gt;&amp;gt;&amp;gt; parsing a schema...
&lt;br&gt;&amp;gt;&amp;gt; compiling a schema...
&lt;br&gt;&amp;gt;&amp;gt; [INFO] generating code
&lt;br&gt;&amp;gt;&amp;gt; unknown location
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Exception in thread &amp;quot;main&amp;quot; java.lang.reflect.UndeclaredThrowableException
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at $Proxy7.required(Unknown Source)
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at
&lt;br&gt;&amp;gt;&amp;gt; com.sun.tools.xjc.generator.bean.field.AbstractField.annotateReferenc
&lt;br&gt;&amp;gt;&amp;gt; e(AbstractField.java:197)
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at
&lt;br&gt;&amp;gt;&amp;gt; com.sun.tools.xjc.generator.bean.field.AbstractField.annotate(Abstrac
&lt;br&gt;&amp;gt;&amp;gt; tField.java:156)
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at
&lt;br&gt;&amp;gt;&amp;gt; com.sun.tools.xjc.generator.bean.field.AbstractListField.generate(Abs
&lt;br&gt;&amp;gt;&amp;gt; tractListField.java:124)
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at
&lt;br&gt;&amp;gt;&amp;gt; com.sun.tools.xjc.generator.bean.field.UntypedListField.&amp;lt;init&amp;gt;(Untype
&lt;br&gt;&amp;gt;&amp;gt; dListField.java:107)
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at
&lt;br&gt;&amp;gt;&amp;gt; com.sun.tools.xjc.generator.bean.field.UntypedListFieldRenderer.gener
&lt;br&gt;&amp;gt;&amp;gt; ate(UntypedListFieldRenderer.java:72)
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at
&lt;br&gt;&amp;gt;&amp;gt; com.sun.tools.xjc.generator.bean.field.DefaultFieldRenderer.generate(
&lt;br&gt;&amp;gt;&amp;gt; DefaultFieldRenderer.java:79)
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at
&lt;br&gt;&amp;gt;&amp;gt; com.sun.tools.xjc.generator.bean.BeanGenerator.generateFieldDecl(Bean
&lt;br&gt;&amp;gt;&amp;gt; Generator.java:747)
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at
&lt;br&gt;&amp;gt;&amp;gt; com.sun.tools.xjc.generator.bean.BeanGenerator.generateClassBody(Bean
&lt;br&gt;&amp;gt;&amp;gt; Generator.java:535)
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at
&lt;br&gt;&amp;gt;&amp;gt; com.sun.tools.xjc.generator.bean.BeanGenerator.&amp;lt;init&amp;gt;(BeanGenerator.j
&lt;br&gt;&amp;gt;&amp;gt; ava:235)
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at
&lt;br&gt;&amp;gt;&amp;gt; com.sun.tools.xjc.generator.bean.BeanGenerator.generate(BeanGenerator
&lt;br&gt;&amp;gt;&amp;gt; .java:175)
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at com.sun.tools.xjc.model.Model.generateCode(Model.java:286)
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at com.sun.tools.xjc.Driver.run(Driver.java:343)
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at com.sun.tools.xjc.Driver.run(Driver.java:191)
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at com.sun.tools.xjc.Driver._main(Driver.java:116)
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at com.sun.tools.xjc.Driver.access$000(Driver.java:74)
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at com.sun.tools.xjc.Driver$1.run(Driver.java:96)
&lt;br&gt;&amp;gt;&amp;gt; Caused by: java.lang.NoSuchMethodException:
&lt;br&gt;&amp;gt;&amp;gt; javax.xml.bind.annotation.XmlElement
&lt;br&gt;&amp;gt;&amp;gt; Ref.required()
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at java.lang.Class.getDeclaredMethod(Unknown Source)
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at
&lt;br&gt;&amp;gt;&amp;gt; com.sun.codemodel.TypedAnnotationWriter.invoke(TypedAnnotationWriter.
&lt;br&gt;&amp;gt;&amp;gt; java:107)
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ... 17 more
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Thanks,
&lt;br&gt;&amp;gt;&amp;gt; John L.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; ---------------------------------------------------------------------
&lt;br&gt;&amp;gt;&amp;gt; To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26501301&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-unsubscribe@...&lt;/a&gt;
&lt;br&gt;&amp;gt;&amp;gt; For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26501301&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-help@...&lt;/a&gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; ---------------------------------------------------------------------
&lt;br&gt;&amp;gt; To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26501301&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-unsubscribe@...&lt;/a&gt;
&lt;br&gt;&amp;gt; For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26501301&amp;i=4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-help@...&lt;/a&gt;
&lt;br&gt;&amp;gt; &amp;nbsp; 
&lt;/div&gt;File &amp;quot;xjc_compiles.xsd&amp;quot;:
&lt;br&gt;&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;
&lt;br&gt;&amp;lt;schema
&lt;br&gt;&amp;nbsp; &amp;nbsp; xmlns=&amp;quot;&lt;a href=&quot;http://www.w3.org/2001/XMLSchema&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.w3.org/2001/XMLSchema&lt;/a&gt;&amp;quot;
&lt;br&gt;&amp;nbsp; &amp;nbsp; targetNamespace=&amp;quot;&lt;a href=&quot;http://www.sudokucaptain.com/CommandString111609&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.sudokucaptain.com/CommandString111609&lt;/a&gt;&amp;quot;
&lt;br&gt;&amp;nbsp; &amp;nbsp; xmlns:cs=&amp;quot;&lt;a href=&quot;http://www.sudokucaptain.com/CommandString111609&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.sudokucaptain.com/CommandString111609&lt;/a&gt;&amp;quot;&amp;gt;
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;lt;element name=&amp;quot;TestElement&amp;quot;&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;complexType&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;choice&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;element name=&amp;quot;element1&amp;quot; /&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;element name=&amp;quot;element2&amp;quot; /&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/choice&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/complexType&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;lt;/element&amp;gt;
&lt;br&gt;&lt;br&gt;&amp;lt;/schema&amp;gt;
&lt;br&gt;&lt;br&gt;File &amp;quot;xjc_doesnt_compile.xsd&amp;quot;:
&lt;br&gt;&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;
&lt;br&gt;&amp;lt;schema
&lt;br&gt;&amp;nbsp; &amp;nbsp; xmlns=&amp;quot;&lt;a href=&quot;http://www.w3.org/2001/XMLSchema&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.w3.org/2001/XMLSchema&lt;/a&gt;&amp;quot;
&lt;br&gt;&amp;nbsp; &amp;nbsp; targetNamespace=&amp;quot;&lt;a href=&quot;http://www.sudokucaptain.com/CommandString111609&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.sudokucaptain.com/CommandString111609&lt;/a&gt;&amp;quot;
&lt;br&gt;&amp;nbsp; &amp;nbsp; xmlns:cs=&amp;quot;&lt;a href=&quot;http://www.sudokucaptain.com/CommandString111609&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.sudokucaptain.com/CommandString111609&lt;/a&gt;&amp;quot;&amp;gt;
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;lt;element name=&amp;quot;TestElement&amp;quot;&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;complexType&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;choice minOccurs=&amp;quot;0&amp;quot; maxOccurs=&amp;quot;unbounded&amp;quot;&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;element name=&amp;quot;element1&amp;quot; /&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;element name=&amp;quot;element2&amp;quot; /&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/choice&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/complexType&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;lt;/element&amp;gt;
&lt;br&gt;&lt;br&gt;&amp;lt;/schema&amp;gt;
&lt;br&gt;&lt;br&gt;The only difference between these two files is this line:
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;choice minOccurs=&amp;quot;0&amp;quot; maxOccurs=&amp;quot;unbounded&amp;quot;&amp;gt;
&lt;br&gt;&lt;br&gt;I think JAXB would have a hard time working with a List containing 
&lt;br&gt;unrelated types. Their only common ancestor would be &amp;quot;Object&amp;quot;. It would 
&lt;br&gt;still be nice, however, if this could be done as it would offer an 
&lt;br&gt;alternative to creating large groups of related types and substitution 
&lt;br&gt;groups.
&lt;br&gt;&lt;br&gt;John L.
&lt;br&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26501301&amp;i=5&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-unsubscribe@...&lt;/a&gt;
&lt;br&gt;For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26501301&amp;i=6&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-help@...&lt;/a&gt;
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/XJC-and-%22choice%22-element.-tp26461900p26501301.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26483947</id>
	<title>Re: question about modularization</title>
	<published>2009-11-23T11:00:16Z</published>
	<updated>2009-11-23T11:00:16Z</updated>
	<author>
		<name>Pavel Bucek</name>
	</author>
	<content type="html">Felipe Gaúcho wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Now, I have some questions, mainly regarding modularization issues.
&lt;br&gt;&amp;gt; Maybe you could help me on this:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; - Let's assume we have module A with a.xsd inside and module B with
&lt;br&gt;&amp;gt; b.xsd. a.xsd defines type t, type u and type v; type u is abstract.
&lt;br&gt;&amp;gt; a.xsd uses the types t and v and extends type u.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; The question is now if it's possible to generate the according
&lt;br&gt;&amp;gt; JAXB-Java-classes at build time for every module separately. This would
&lt;br&gt;&amp;gt; mean that we have calsses for the types t, u and v in module A. And
&lt;br&gt;&amp;gt; class that extends type u in module B. This would mean that during build
&lt;br&gt;&amp;gt; time of module B, JAXB has to know that the classes of a.xsd have been
&lt;br&gt;&amp;gt; generated already and as well their names and packages.
&lt;br&gt;&amp;gt; - Is this possible?
&lt;br&gt;&amp;gt; &amp;nbsp; 
&lt;/div&gt;yes, it is. Look at 
&lt;br&gt;&lt;a href=&quot;http://weblogs.java.net/blog/2006/09/05/separate-compilation-jaxb-ri-21&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://weblogs.java.net/blog/2006/09/05/separate-compilation-jaxb-ri-21&lt;/a&gt;&lt;br&gt;&amp;gt; - Does this make sense?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Another question is about file resolving.
&lt;br&gt;&amp;gt; - Is there a possibility to provide an alternative file resolver (e.g.
&lt;br&gt;&amp;gt; that looks referenced schema files up in the classpath)?
&lt;br&gt;&amp;gt; &amp;nbsp; 
&lt;br&gt;not sure what you mean or what you want to achieve. If you mean &amp;nbsp;this as 
&lt;br&gt;a XML input the answer is &amp;quot;no&amp;quot;, but please try describe your use case in 
&lt;br&gt;more detail..
&lt;br&gt;&lt;br&gt;Pavel
&lt;br&gt;&lt;br&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26483947&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-unsubscribe@...&lt;/a&gt;
&lt;br&gt;For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26483947&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-help@...&lt;/a&gt;
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/question-about-modularization-tp26483323p26483947.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26483835</id>
	<title>Re: question about modularization</title>
	<published>2009-11-23T10:52:38Z</published>
	<updated>2009-11-23T10:52:38Z</updated>
	<author>
		<name>Wolfgang Laun-2</name>
	</author>
	<content type="html">On 11/23/09, Felipe Gaúcho &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26483835&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;fgaucho@...&lt;/a&gt;&amp;gt; wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Now, I have some questions, mainly regarding modularization issues.
&lt;br&gt;&amp;gt; Maybe you could help me on this:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; - Let's assume we have module A with a.xsd inside and module B with
&lt;br&gt;&amp;gt; b.xsd. a.xsd defines type t, type u and type v; type u is abstract.
&lt;br&gt;&amp;gt; a.xsd uses the types t and v and extends type u.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; The question is now if it's possible to generate the according
&lt;br&gt;&amp;gt; JAXB-Java-classes at build time for every module separately. This would
&lt;br&gt;&amp;gt; mean that we have calsses for the types t, u and v in module A. And
&lt;br&gt;&amp;gt; class that extends type u in module B. This would mean that during build
&lt;br&gt;&amp;gt; time of module B, JAXB has to know that the classes of a.xsd have been
&lt;br&gt;&amp;gt; generated already and as well their names and packages.
&lt;br&gt;&amp;gt; - Is this possible?
&lt;/div&gt;Yes.
&lt;br&gt;&amp;gt; - Does this make sense?
&lt;br&gt;Yes.
&lt;br&gt;&lt;br&gt;The way to do this (without customization) is to put the Schema definitions for
&lt;br&gt;types t, u, v into a namespace resulting in the package name for A and
&lt;br&gt;the things that use (and extend) these types into B's namespace. The
&lt;br&gt;schema b.xsd
&lt;br&gt;would use xsd:import schema a.xsd so that there is only one glorious
&lt;br&gt;xjc run, producing all classes at the same time.
&lt;br&gt;&lt;br&gt;Outlines for a.xsd and b.xsd:
&lt;br&gt;&lt;br&gt;&amp;lt;xsd:schema xmlns:xsd=&amp;quot;&lt;a href=&quot;http://www.w3.org/2001/XMLSchema&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.w3.org/2001/XMLSchema&lt;/a&gt;&amp;quot;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; targetNamespace=&amp;quot;/some/where/a&amp;quot;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; xmlns:a=&amp;quot;/some/where/a&amp;quot;&amp;gt;
&lt;br&gt;&amp;lt;/xsd:schema&amp;gt;
&lt;br&gt;&lt;br&gt;&amp;lt;xsd:schema xmlns:xsd=&amp;quot;&lt;a href=&quot;http://www.w3.org/2001/XMLSchema&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.w3.org/2001/XMLSchema&lt;/a&gt;&amp;quot;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; targetNamespace=&amp;quot;/some/where/b&amp;quot;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; xmlns:b=&amp;quot;/some/where/b&amp;quot;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; xmlns:a=&amp;quot;/some/where/a&amp;quot;&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;lt;xsd:import namespace=&amp;quot;/some/where/a&amp;quot;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; schemaLocation=&amp;quot;a.xsd&amp;quot;/&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;lt;!-- Refer to a definition from a.xsd, e.g.: --&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;lt;xsd:element name=&amp;quot;foo&amp;quot; type=&amp;quot;a:u&amp;quot;/&amp;gt;
&lt;br&gt;&amp;lt;/xsd:schema&amp;gt;
&lt;br&gt;&lt;br&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Another question is about file resolving.
&lt;br&gt;&amp;gt; - Is there a possibility to provide an alternative file resolver (e.g.
&lt;br&gt;&amp;gt; that looks referenced schema files up in the classpath)?
&lt;br&gt;&lt;br&gt;Your question isn't clear to me. Schema files (presumably to be used
&lt;br&gt;for validation) aren't different from any other data files in your
&lt;br&gt;classpath. Class.getResourceAsStream(String path) should do the trick.
&lt;br&gt;&lt;br&gt;-W
&lt;br&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26483835&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-unsubscribe@...&lt;/a&gt;
&lt;br&gt;For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26483835&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-help@...&lt;/a&gt;
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/question-about-modularization-tp26483323p26483835.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26483323</id>
	<title>question about modularization</title>
	<published>2009-11-23T10:19:32Z</published>
	<updated>2009-11-23T10:19:32Z</updated>
	<author>
		<name>Felipe Gaucho</name>
	</author>
	<content type="html">Now, I have some questions, mainly regarding modularization issues.
&lt;br&gt;Maybe you could help me on this:
&lt;br&gt;&lt;br&gt;- Let's assume we have module A with a.xsd inside and module B with
&lt;br&gt;b.xsd. a.xsd defines type t, type u and type v; type u is abstract.
&lt;br&gt;a.xsd uses the types t and v and extends type u.
&lt;br&gt;&lt;br&gt;The question is now if it's possible to generate the according
&lt;br&gt;JAXB-Java-classes at build time for every module separately. This would
&lt;br&gt;mean that we have calsses for the types t, u and v in module A. And
&lt;br&gt;class that extends type u in module B. This would mean that during build
&lt;br&gt;time of module B, JAXB has to know that the classes of a.xsd have been
&lt;br&gt;generated already and as well their names and packages.
&lt;br&gt;- Is this possible?
&lt;br&gt;- Does this make sense?
&lt;br&gt;&lt;br&gt;Another question is about file resolving.
&lt;br&gt;- Is there a possibility to provide an alternative file resolver (e.g.
&lt;br&gt;that looks referenced schema files up in the classpath)?
&lt;br&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26483323&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-unsubscribe@...&lt;/a&gt;
&lt;br&gt;For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26483323&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-help@...&lt;/a&gt;
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/question-about-modularization-tp26483323p26483323.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26480479</id>
	<title>Re: XJC get the annotaion of an created field or as alternative the  property order</title>
	<published>2009-11-23T07:44:36Z</published>
	<updated>2009-11-23T07:44:36Z</updated>
	<author>
		<name>Florian Bachmann-2</name>
	</author>
	<content type="html">Hey /lexi,
&lt;br&gt;thank you, this should help me (:
&lt;br&gt;regards Flori
&lt;br&gt;&lt;br&gt;On 23.11.2009, at 16:40, Aleksei Valikov wrote:
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Hi,
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt;&amp;gt; Hello XJC-Users,
&lt;br&gt;&amp;gt;&amp;gt; is there a way to get to annotations of an generated class?
&lt;br&gt;&amp;gt;&amp;gt; Assume ich have a ClassOutline classOutline.
&lt;br&gt;&amp;gt;&amp;gt; Is there a method, like: classOutline.target.getAnnotations();
&lt;br&gt;&amp;gt;&amp;gt; 
&lt;br&gt;&amp;gt;&amp;gt; The reason, I like to get these information is, that I like to access to XmlType propOrder-Annotation.
&lt;br&gt;&amp;gt;&amp;gt; 
&lt;br&gt;&amp;gt;&amp;gt; For Example, JAXB generates
&lt;br&gt;&amp;gt;&amp;gt; @XmlAccessorType(XmlAccessType.FIELD)
&lt;br&gt;&amp;gt;&amp;gt; @XmlType(name = &amp;quot;MyClassType&amp;quot;, propOrder = {
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;quot;firstField&amp;quot;,
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;quot;secondField&amp;quot;,
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;quot;thirdField&amp;quot;,
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;quot;anOtherField&amp;quot;
&lt;br&gt;&amp;gt;&amp;gt; })
&lt;br&gt;&amp;gt;&amp;gt; public class MyClass {}
&lt;br&gt;&amp;gt;&amp;gt; 
&lt;br&gt;&amp;gt;&amp;gt; Is it possible to access the annotation of the created prop-order annotation, to get the order of the created fields? To know, that the secondField is really the second field and anOtherField is the fourth field? Or is it possible to find out the property/field order?
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; You can't get this information from the code model without hacks. And
&lt;br&gt;&amp;gt; it's not the right way anyway.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; The right way would be to get this information from the CClassInfo.
&lt;br&gt;&amp;gt; See how the propOrder field is generated:
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;CClassInfo target = ...;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;...
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if(target.isOrdered()) {
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;for(CPropertyInfo p : target.getProperties() ) {
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if( ! (p instanceof CAttributePropertyInfo )) {
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if (!( (p instanceof CReferencePropertyInfo) &amp;&amp;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ((CReferencePropertyInfo)p).isDummy())) {
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;xtw.propOrder(p.getName(false));
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;} else {
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// produce empty array
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;xtw.getAnnotationUse().paramArray(&amp;quot;propOrder&amp;quot;);
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Bye.
&lt;br&gt;&amp;gt; /lexi
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; ---------------------------------------------------------------------
&lt;br&gt;&amp;gt; To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26480479&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-unsubscribe@...&lt;/a&gt;
&lt;br&gt;&amp;gt; For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26480479&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-help@...&lt;/a&gt;
&lt;br&gt;&amp;gt; 
&lt;/div&gt;&lt;br&gt;--
&lt;br&gt;Florian Bachmann, Softwareentwicklung
&lt;br&gt;Micromata GmbH
&lt;br&gt;Hauptsitz: Marie-Calm Str. 1-5, D-34131 Kassel
&lt;br&gt;Niederlassung Bonn: Menuhinstr. 8, 53113 Bonn
&lt;br&gt;Tel: +49 561 / 31 67 93 - 0
&lt;br&gt;Fax: +49 561 / 31 67 93 - 11
&lt;br&gt;mailto: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26480479&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;f.bachmann@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://www.micromata.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.micromata.com&lt;/a&gt;&lt;br&gt;AG Kassel HRB 7370
&lt;br&gt;Geschäftsführung:
&lt;br&gt;Dipl.-Ing. Thomas Landgraf
&lt;br&gt;Dipl.-Phys. Kai Reinhard
&lt;br&gt;&lt;br&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26480479&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-unsubscribe@...&lt;/a&gt;
&lt;br&gt;For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26480479&amp;i=4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-help@...&lt;/a&gt;
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/XJC-get-the-annotaion-of-an-created-field-or-as-alternative-the-property-order-tp26480202p26480479.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26480381</id>
	<title>Re: XJC get the annotaion of an created field or as alternative the  property order</title>
	<published>2009-11-23T07:40:22Z</published>
	<updated>2009-11-23T07:40:22Z</updated>
	<author>
		<name>Aleksei Valikov</name>
	</author>
	<content type="html">Hi,
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Hello XJC-Users,
&lt;br&gt;&amp;gt; is there a way to get to annotations of an generated class?
&lt;br&gt;&amp;gt; Assume ich have a ClassOutline classOutline.
&lt;br&gt;&amp;gt; Is there a method, like: classOutline.target.getAnnotations();
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; The reason, I like to get these information is, that I like to access to XmlType propOrder-Annotation.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; For Example, JAXB generates
&lt;br&gt;&amp;gt; @XmlAccessorType(XmlAccessType.FIELD)
&lt;br&gt;&amp;gt; @XmlType(name = &amp;quot;MyClassType&amp;quot;, propOrder = {
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp;&amp;quot;firstField&amp;quot;,
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp;&amp;quot;secondField&amp;quot;,
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp;&amp;quot;thirdField&amp;quot;,
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp;&amp;quot;anOtherField&amp;quot;
&lt;br&gt;&amp;gt; })
&lt;br&gt;&amp;gt; public class MyClass {}
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Is it possible to access the annotation of the created prop-order annotation, to get the order of the created fields? To know, that the secondField is really the second field and anOtherField is the fourth field? Or is it possible to find out the property/field order?
&lt;/div&gt;&lt;br&gt;You can't get this information from the code model without hacks. And
&lt;br&gt;it's not the right way anyway.
&lt;br&gt;&lt;br&gt;The right way would be to get this information from the CClassInfo.
&lt;br&gt;See how the propOrder field is generated:
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; CClassInfo target = ...;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ...
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(target.isOrdered()) {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; for(CPropertyInfo p : target.getProperties() ) {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if( ! (p instanceof CAttributePropertyInfo )) {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (!( (p instanceof CReferencePropertyInfo) &amp;&amp;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;((CReferencePropertyInfo)p).isDummy())) {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; xtw.propOrder(p.getName(false));
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; } else {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // produce empty array
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; xtw.getAnnotationUse().paramArray(&amp;quot;propOrder&amp;quot;);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&lt;br&gt;Bye.
&lt;br&gt;/lexi
&lt;br&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26480381&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-unsubscribe@...&lt;/a&gt;
&lt;br&gt;For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26480381&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-help@...&lt;/a&gt;
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/XJC-get-the-annotaion-of-an-created-field-or-as-alternative-the-property-order-tp26480202p26480381.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26480202</id>
	<title>XJC get the annotaion of an created field or as alternative the property order</title>
	<published>2009-11-23T07:32:22Z</published>
	<updated>2009-11-23T07:32:22Z</updated>
	<author>
		<name>Florian Bachmann-2</name>
	</author>
	<content type="html">Hello XJC-Users,
&lt;br&gt;is there a way to get to annotations of an generated class?
&lt;br&gt;Assume ich have a ClassOutline classOutline.
&lt;br&gt;Is there a method, like: classOutline.target.getAnnotations();
&lt;br&gt;&lt;br&gt;The reason, I like to get these information is, that I like to access to XmlType propOrder-Annotation.
&lt;br&gt;&lt;br&gt;For Example, JAXB generates
&lt;br&gt;@XmlAccessorType(XmlAccessType.FIELD)
&lt;br&gt;@XmlType(name = &amp;quot;MyClassType&amp;quot;, propOrder = {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;quot;firstField&amp;quot;,
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;quot;secondField&amp;quot;,
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;quot;thirdField&amp;quot;,
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;quot;anOtherField&amp;quot;
&lt;br&gt;})
&lt;br&gt;public class MyClass {}
&lt;br&gt;&lt;br&gt;Is it possible to access the annotation of the created prop-order annotation, to get the order of the created fields? To know, that the secondField is really the second field and anOtherField is the fourth field? Or is it possible to find out the property/field order?
&lt;br&gt;&lt;br&gt;regards Flori
&lt;br&gt;&lt;br&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26480202&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-unsubscribe@...&lt;/a&gt;
&lt;br&gt;For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26480202&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-help@...&lt;/a&gt;
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/XJC-get-the-annotaion-of-an-created-field-or-as-alternative-the-property-order-tp26480202p26480202.html" />
</entry>

</feed>
