Where is the "set" method for this ELEMENT?

Hi
I'm trying to understand the relationship between the DTD and XJS, and the JAXB generated code.
Consider the example DTD, XJS, and generated source code (i.e., "value07.java") for ELEMENT value07, below ...
QUESTION#1: Why is there no "set" method generated for ELEMENT "value07a" within the generated value07.java ???
QUESTION#2: How to I code the DTD/XJS in order to force the generation of a "set" method in value07.java???.
-- I want to be able to set a new value for ELEMENT "value07a" in order to generate an XML document containing the new value!!
(NOTE: the reason that ELEMENT value07 (as well as other ELEMENTs) has only a single subelement, is in order to satisfy the XSLT definition in a preexisting application.)
* * * this is the DTD* * *
<!ELEMENT request                          (value01,value02,value03,value04,value05?,value06?,value07?,value08?,value09?,value10?,value11?,value12?,value13?,value14?,value15?,value16?,value17?,value18?)>
<!ELEMENT value01                          (#PCDATA)>
<!ELEMENT value02                          (#PCDATA)>
<!ELEMENT value03                          (#PCDATA)>
<!ELEMENT value04                          (value04a, value04b?)>
<!ELEMENT value04a                          (#PCDATA)>
<!ELEMENT value04b                          (#PCDATA)>
<!ELEMENT value05                          (value05a, value05b?)>
<!ELEMENT value05a                          (#PCDATA)>
<!ELEMENT value05b                          (#PCDATA)>
<!ELEMENT value06                          (value06a+)>
<!ELEMENT value06a                          (#PCDATA)>
<!ELEMENT value07                          (value07a+)>
<!ELEMENT value07a                          (#PCDATA)>
<!ELEMENT value08                          (value08a+)>
<!ELEMENT value08a                          (#PCDATA)>
<!ELEMENT value09                          (value09a+)>
<!ELEMENT value09a                          (#PCDATA)>
<!ELEMENT value10                          (value10a+)>
<!ELEMENT value10a                          (#PCDATA)>
<!ELEMENT value11                          (value11a+)>
<!ELEMENT value11a                          (#PCDATA)>
<!ELEMENT value12                          (value12a+)>
<!ELEMENT value12a                          (#PCDATA)>
<!ELEMENT value13                          (value13a+)>
<!ELEMENT value13a                          (#PCDATA)>
<!ELEMENT value14                          (value14a+)>
<!ELEMENT value14a                          (#PCDATA)>
<!ELEMENT value15                          (value15a+)>
<!ELEMENT value15a                          (#PCDATA)>
<!ELEMENT value16                          (value16a+)>
<!ELEMENT value16a                          (#PCDATA)>
<!ELEMENT value17                          (value17a+)>
<!ELEMENT value17a                          (#PCDATA)>
<!ELEMENT value18                          (value18a+)>
<!ELEMENT value18a                          (#PCDATA)>
* * * this is the XJS * * *
<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE xml-java-binding-schema SYSTEM "http://java.sun.com/dtd/jaxb/1.0-ea/xjs.dtd">
<xml-java-binding-schema version="1.0-ea">
<options package="testSourceCode"/>
<element name="request" type="class" root="true"/>
     <element name="value01"                               type="value"/>
     <element name="value02"                               type="value"/>
     <element name="value03"                          type="value"/>
     <element name="value04" type="class">
          <content>
               <element-ref name="value04a" />
               <element-ref name="value04b" />
          </content>
     </element>
     <element name="value05" type="class">
          <content>
               <element-ref name="value05a" />
               <element-ref name="value05b" />
          </content>
     </element>
     <element name="value06" type="class">
          <content>
               <element-ref name="value06a" />
          </content>
     </element>
     <element name="value07" type="class">
          <content>
               <element-ref name="value07a" />
          </content>
     </element>
     <element name="value08" type="class">
          <content>
               <element-ref name="value08a" />
          </content>
     </element>
     <element name="value09" type="class">
          <content>
               <element-ref name="value09a" />
          </content>
     </element>
     <element name="value10" type="class">
          <content>
               <element-ref name="value10a" />
          </content>
     </element>
     <element name="value11" type="class">
          <content>
               <element-ref name="value11a" />
          </content>
     </element>
     <element name="value12" type="class">
          <content>
               <element-ref name="value12a" />
          </content>
     </element>
     <element name="value13" type="class">
          <content>
               <element-ref name="value13a" />
          </content>
     </element>
     <element name="value14" type="class">
          <content>
               <element-ref name="value14a" />
          </content>
     </element>
     <element name="value15" type="class">
          <content>
               <element-ref name="value15a" />
          </content>
     </element>
     <element name="value16" type="class">
          <content>
               <element-ref name="value16a" />
          </content>
     </element>
     <element name="value17" type="class">
          <content>
               <element-ref name="value17a" />
          </content>
     </element>
     <element name="value18" type="class">
          <content>
               <element-ref name="value18a" />
          </content>
     </element>
</xml-java-binding-schema>
* * * generated sourcecode for ELEMENT "value07"...i.e., "value07.java" * * *
package testSourceCode;
import java.io.IOException;
import java.io.InputStream;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import javax.xml.bind.ConversionException;
import javax.xml.bind.Dispatcher;
import javax.xml.bind.Element;
import javax.xml.bind.InvalidAttributeException;
import javax.xml.bind.InvalidContentObjectException;
import javax.xml.bind.LocalValidationException;
import javax.xml.bind.MarshallableObject;
import javax.xml.bind.Marshaller;
import javax.xml.bind.MissingContentException;
import javax.xml.bind.PredicatedLists;
import javax.xml.bind.PredicatedLists.Predicate;
import javax.xml.bind.StructureValidationException;
import javax.xml.bind.UnmarshalException;
import javax.xml.bind.Unmarshaller;
import javax.xml.bind.Validator;
import javax.xml.marshal.XMLScanner;
import javax.xml.marshal.XMLWriter;
public class Value07
extends MarshallableObject
implements Element
private List _Value07A = PredicatedLists.createInvalidating(this, new Value07APredicate(), new ArrayList());
private PredicatedLists.Predicate pred_Value07A = new Value07APredicate();
public List getValue07A() {
return _Value07A;
public void deleteValue07A() {
_Value07A = null;
invalidate();
public void emptyValue07A() {
Value07A = PredicatedLists.createInvalidating(this, predValue07A, new ArrayList());
public void validateThis()
throws LocalValidationException
if (_Value07A == null) {
throw new MissingContentException("value07a");
public void validate(Validator v)
throws StructureValidationException
public void marshal(Marshaller m)
throws IOException
XMLWriter w = m.writer();
w.start("value07");
for (Iterator i = _Value07A.iterator(); i.hasNext(); ) {
w.leaf("value07a", ((String) i.next()).toString());
w.end("value07");
public void unmarshal(Unmarshaller u)
throws UnmarshalException
XMLScanner xs = u.scanner();
Validator v = u.validator();
xs.takeStart("value07");
while (xs.atAttribute()) {
String an = xs.takeAttributeName();
throw new InvalidAttributeException(an);
List l = new ArrayList();
while (xs.atStart()) {
if (xs.atStart("value07a")) {
xs.takeStart("value07a");
String s;
if (xs.atChars(XMLScanner.WS_COLLAPSE)) {
s = xs.takeChars(XMLScanner.WS_COLLAPSE);
} else {
s = "";
String uf;
try {
uf = String.valueOf(s);
} catch (Exception x) {
throw new ConversionException("value07a", x);
l.add(uf);
xs.takeEnd("value07a");
} else {
break;
Value07A = PredicatedLists.createInvalidating(this, predValue07A, l);
xs.takeEnd("value07");
public static Value07 unmarshal(InputStream in)
throws UnmarshalException
return unmarshal(XMLScanner.open(in));
public static Value07 unmarshal(XMLScanner xs)
throws UnmarshalException
return unmarshal(xs, newDispatcher());
public static Value07 unmarshal(XMLScanner xs, Dispatcher d)
throws UnmarshalException
return ((Value07) d.unmarshal(xs, (Value07 .class)));
public boolean equals(Object ob) {
if (this == ob) {
return true;
if (!(ob instanceof Value07)) {
return false;
Value07 tob = ((Value07) ob);
if (_Value07A!= null) {
if (tob._Value07A == null) {
return false;
if (!_Value07A.equals(tob._Value07A)) {
return false;
} else {
if (tob._Value07A!= null) {
return false;
return true;
public int hashCode() {
int h = 0;
h = ((127 *h)+((_Value07A!= null)?_Value07A.hashCode(): 0));
return h;
public String toString() {
StringBuffer sb = new StringBuffer("<<value07");
if (_Value07A!= null) {
sb.append(" value07a=");
sb.append(_Value07A.toString());
sb.append(">>");
return sb.toString();
public static Dispatcher newDispatcher() {
return Request.newDispatcher();
private static class Value07APredicate
implements PredicatedLists.Predicate
public void check(Object ob) {
if (!(ob instanceof String)) {
throw new InvalidContentObjectException(ob, (String.class));

I discovered something similar this morning...i.e., for
<element name="value07" type="class">
<content>
<element-ref name="value07a" />
</content>
</element>
-- I did something like this...
Value7 v7 = new Value7();
for (int i=0; i< Value7_input_array.length; i++)
((List)(v7.getValue07A())).add(Value7_input_array);
Thanks for responding, barry!

Similar Messages

  • JAXB is not generating the setter method for my tag

    Hi,
    I am generating java classes form my .xsd file using JAXB.
    The xsd definition has defnes a Form as a sequence of FormElement, where FormElement is a choice of graphical components like text etc. Form can have 0 or unbounded elements of typeFormElement
    Example
    <xs:element ref="sswfm:FormElement" minOccurs="0" maxOccurs="unbounded"/>
    It is creating the getter method for this tag like this-
    java.util.List getFormElement();
    but does not create setter method, namely, setFormElements which I would like to use when marshalling from swing to XML.
    If i remove the maxOccurs="unbounded, it is creating the setter method for this tag.But i want to keep this tag as it it and needs the setter method also.
    What should i do? Has one tried this before. HELP if you can
    Thank you in advance.

    Hi RavindraKshirsagar,
    We have a problem like you faced. Our requirement is that, we need to generate dynamically the PERSON element in our javabean.
    <xs:element name='SERVICE_REQUESTER'>
              <xs:complexType>
                   <xs:sequence>
                        <xs:element ref='ORGANIZATION' />
                        <xs:element ref='PERSON' maxOccurs='unbounded' />
                   </xs:sequence>
              </xs:complexType>
         </xs:element>For this maxOccurs, as JAXB is not generating any Setter Method. As we need to get data dynamically from external application. If you could help us in handling this case dynamically, it will be well and good.
    Please send us the script / code asap.

  • Where is the download link for premiere elements 10 and previous versions?

    Where is the download link for premiere elements 10 and previous versions?
    Also the search program doesn't find previous version downloads.
    Chat is completely busy and won't let me in.
    And I am not paying $39 for what is an Adobe issue.
    FAIL!
    Anyone know where I might find it?

    A.T. Romano wrote:
    ProDesignTools offers these downloads for the Adobe tryouts of older Photoshop Elements and Premiere Elements versions
    What I've always found strange though is that the downloads themselves come from Adobe's servers. Just seems weird that Adobe themselves won't provide the links!
    Cheers,
    Neale
    Insanity is hereditary, you get it from your children
    If this post or another user's post resolves the original issue, please mark the posts as correct and/or helpful accordingly. This helps other users with similar trouble get answers to their questions quicker. Thanks.

  • Why it cannot find the setter method for the attribute in my custom tag?

    Hi, i have a custom tag like this:
    <robin:category tModelKey="#{data.tModelKey}" > </robin:category>And in my tld file:
    <tag>
          <name>category</name>
         <tag-class>category.component.HtmlCategoryTag</tag-class>
         <attribute>
             <name>tModelKey</name>
             <required>false</required>
             <rtexprvalue>false</rtexprvalue>
             <type>java.lang.String</type>
         </attribute>
    </tag>
    ........................................and in my HtmlCategoryTag Class
    public class HtmlCategoryTag extends HtmlPanelGridTag
    private String tModelKey;
    public String getTModelKey()
    return tModelKey;
    public void setTModelKey(String modelKey)
    tModelKey = modelKey;
    So,you see,generally speaking,to use a custom tag,we only to write a tag class,declare it in the tld file,nothing more.
    What fints me is that if i change "tModelKey" to "test" and change the according part in the tag class , tld file and jsp file, the "setter not found" problem no longer exists,everything goes right!!!.
    So why this happens? please help:)
    Best Regards:)
    Robin

    Then you also need to create a UI element that extends HtmlPanelGrid
    that has a tModelKey member and getters/setters. That object will hold
    the information so that you can use it in your bean.Whoops... ignore that! Sorry. Attributes are simply stored in the component map component.getAttributes().
    Add to your Tag class:
    public void setProperties(UIComponent component) {
        super.setProperties(component);
        Tags.setString(component, "tModelKey", tModelKey);
    public void release() {
        // see above
    }Where Tags.java is:public class Tags {
        public static void setString(UIComponent component, String attributeName, String attributeValue) {
            if (attributeValue != null) {
                if (UIComponentTag.isValueReference(attributeValue)) {
                    setValueBinding(component, attributeName, attributeValue);
                } else {
                    component.getAttributes().put(attributeName, attributeValue);
        public static void setValueBinding(UIComponent component, String attributeName, String attributeValue) {
            FacesContext context = FacesContext.getCurrentInstance();
            Application app = context.getApplication();
            ValueBinding vb = app.createValueBinding(attributeValue);
            component.setValueBinding(attributeName, vb);
    }

  • P6N support, where is the support page for this motherboard?

    i have recently purchased an pn6 motherboard, but can't find any updates or support on msi website, i am worried becasue nvidia have had issues with sata and stuff, other manufactures have released new fixes. So what is msi doing? Where is the support?

    I'm ordering the 650i for myself... 680i just too bad, dun have internal PATA, which I worry that the JMicron thing will come back and haunt the user...
    the next thing to worry is Nvidia chipset is known to be power hunger....

  • TR priority (LTBK-TBPRI) - where are the config. settings for this ?

    Because I can't find it !
    Thanks,
    Nick

    As for value for the field:
    Yes, if you check the value range for data type TBPRI you will see that there are neither fixed values nor config table behind it. In this case I think only the data type restricts which values can be inputted into the field.
    In case of TRs you can use this priority for selection e.g. in LB10.
    I guess this indicator might be important e.g. in programs which processes TRs, PCNs, deliveries, TOs in mass (system may take care of the sequence based on this like there are hints in OSS notes 1360335, 312656)
    Mayeb someone who uses this indicator can give more information / explanation.
    (I used it only once to prioritize TRs in connection with PrdOrds)
    Edited by: Csaba Szommer on Aug 5, 2010 3:26 PM

  • HT203782 older programming will not fill my screen! where is the aspect ajustment for this devise? roku

    when watching older tv programing my tv screen does not fill up! where is the aspect ajustment?  roku & netgear have them my tv screen fills up using them!

    depend on the source I suppose if you play non widescreen media on a widescreen tv there is no magic way to make it display full screen unless you cut up top and buttom

  • Where is the Stop method for CWDI?

    All the other DMA classes have a Stop mehtod. Why not CWDI?

    Hi rcsj1,
    The Reset method should be used to stop the digital input. A command to stop but not reset the resources was not explicitly exported to be used with the ActiveX control CWDI. Hope that helps. Have a good day.
    Ron

  • I really need to speed up my IMAC.  I purchased a new external drive specifically formatted for apple.  I also would like to move some other media (movies and music) to this external drive.  What is the best method for this?

    Please help...I need to delete iphoto pictures and back up to external drive without losing pictures. I have the external drive and would like to start this process.  Can you help?

    Formatted for Mac is not a format - for iPhoto you MUST verify that it is formatted Mac OS extended (journaled)
    and putting your iPhoto library on an external drive is NOT a backup - you MUST have a good backup plan like Time Machine running or you are 100% guaranteed to lose your photos sooner or later
    Moving the iPhoto library is safe and simple - quit iPhoto and drag the iPhoto library intact as a single entity to the external drive - depress the option key and launch iPhoto using the "select library" option to point to the new location on the external drive - fully test it and then trash the old library on the internal drive (test one more time prior to emptying the trash)
    And be sure that the External drive is formatted Mac OS extended (journaled) (iPhoto does not work with drives with other formats) and that it is always available prior to launching iPhoto
    And backup soon and often - having your iPhoto library on an external drive is not a backup and if you are using Time Machine you need to check and be sure that TM is backing up your external drive
    other media questions need to be ask in the forum for the software you use for them - this forum is only for iPhoto and the above instructions are only for iPhoto
    LN

  • TS3899 after a recent ios7 update I receive three versions of the same email, one in each of my three email accounts. where is the setting that corrects this issue?

    i am getting duplicate emails...one in each of my three email accounts

    Reset the phone, delete and re-add the accounts....

  • Won't let me drag music to list?  Where is the setting to change this??

    trying to make my own music list and it won't let me drag the music to the file I want it to go to? Help.

    If the playlist is purple, it is a smart playlist. You cannot drag songs to it.

  • Where is the best shop for new mac pro's memory in America ?

    Dear all.
    Thank you for your advice in advance.
    I bought new mac pro at yesterday. But here is japan,so really expensive new mac pro's memory.
    So I want to buy memory at America by internet.
    If you know where is the best shop for this memory's price and stability,please let me know.
    Really thank you for your advice. I want to buy 16G in now.

    I bought a "8GB FULLY BUFFERED PC6400 DDR2 ECC (FB-DIMM) 800MHz SPECIAL APPLE KIT (Four modules 2GB) MB194G/A" from Memoryamerica.com for $395.
    killer deal.works perfectly, no overheating , no issues.
    They shipped the sameday. they say on their website that they are the only website shipping the new memory.It must be true, people who ordered from OWC, macsales are still waiting...I am happy I ordered from them.They even have the 4GB modules in stock.These guys are really good.
    http://store.memoryamerica.com/fully-buffered-pc6400-ddr2-ecc-8gb-apple-kit.html

  • Where is the schema for this element: weblogic-wsee-standaloneclient

    i can't find the schema for this element anywhere: weblogic-wsee-standaloneclient. it is found int the <servicename>_internaldd.xml doc that is generated by the clientgentask ant task. can someone inform me of where it is?
    thanks, shane

    http://www.bea.com/ns/weblogic/90/weblogic-standalone-wsclient.xsd
    -- Rob
    WLS Blog http://dev2dev.bea.com/blog/rwoollen/

  • Why can I no longer, after having downloaded Lion, write accents and other diacriticals when in the Google, Yahoo, FaceBook, or even here in this post? The new method for getting at the "option" symbols works fine in other places like spotlight, but now e

    Why can I no longer, after having downloaded Lion, write accents and other diacriticals when in the Google, Yahoo, FaceBook, or even here in this post? The new method for getting at the "option" symbols works fine in other places like spotlight, but now even the older "option+letter" doesn't work in most places.

    Chrome doesn't support the new accent/diacritics/macron chooser. I'm not sure about other browsers such as Firefox. You can use the old Option+letter combination that Doug suggested. Hopefully updates will solve these little incompatibilities shortly.
    Neill

  • Pro Tool Studio LE 7 upgrade... anyone knows where I can buy the upgrade version for this? and how much does it cost?

    I have a Mac Pro 2006 running on leopard and I need to upgrade my Pro Tool Studio LE 7 to 8 so it can work on Leopard.. anyone knows where I can buy the upgrade version for this? and how much does it cost?

    Upgrade to Pro Tools Studio LE 8: - http://shop.avid.com/store/product.do?product=288865113879120
    But it would be worth searching through the Updates to see if there is an update for Leopard, which it looks like there is: - http://avid.custkb.com/avid/app/selfservice/search.jsp?DocId=355241

Maybe you are looking for

  • Reg.Error in account determination: table T030K key NCCA EXD

    Dear Friends we are doing domestic sales for that I am doing pricing procedure, I create 5 condition types without access sequence,and I manualy enter all the mrp price,mrp discount,bed,eces,shec and cst in billing,  during the billing release I am g

  • ITunes Manually Manage Music

    Hi, I am wondering if I have an iPod and so does my boyfriend and he has a CD of his that he ripped to his iTunes and I want it, is there a way for me to select the Manually Manage Music option and add just that CD from his iTunes in stead of having

  • Weird filename are getting created in archive directory.

    Hi All, Weird filename are getting created in archive directory. I have one ftp adapter,after the file getting processed the file's are getting moved to archive directory. But with some different file name/ filename are randomly generated. But the co

  • Need help connect Access Database to Crystal Report Viewer in java

    Need example for passing parameters to PropertyBag Class and IConnectionInfo Class. We use CR_JRC_11.8 Thanks

  • How to delete and start again?

    I've finished ripping my collection of 480+ CDs but I really think a big mistake I made was signing-up to Match before I'd finished. I've got various minor problems (such as mismatched art which won't synchronize) and some bigger problems (such as so