Subject: Choice element in JAXB 1.x

Recently i ran into problem of having too many elements in choice tag. JAXB doesn't throw exception, but generated files doesn't comply Java.
While compilation it throws "code too large" exception. On removing few i can manage, but i am looking for long term solution.
Any suggestion appreciated.
-Balaji S

As per my understanding the * at the end SEDOL | SILCHESTER)*> making it to create choice or replace. If you remove star from you DTD it will generate OTD without choice.
Thanks
Sanjeev

Similar Messages

  • ABAP Proxy generation terminated (WSDl choice element not supported)

    Hello
    Im trying to generate ABAP proxy from WSDL file (A valid XSD file has imported as External definitions in to XI Integration Repository and created Out bound Interface which gives WSDL file for Proxy generation in SPROXY).
    Unfortunately one of the WSDL file element "<choice>" not supported by ABAP Proxy Generation. it gives the following error.
    Proxy generation terminated: WSDL error (<choice> not supported)
    Message no. SPRX038
    Syntax of <choice> element code in WSDL file:
    <xsd:choice minOccurs='1' maxOccurs='1'>
    <xsd:element name='Employees' minOccurs='1' maxOccurs='1'>
    </xsd:element>
    </xsd:choice>
    Can some one please help if already come across this kind of problem.
    Please suggest me if there any alternate element for WSDL <choice>.
    Regards
    Rajesh

    Hi Aamir
    Thanks for your help...
    I have gone through attached thread.
    Does It means should i change <choice> element with any alternate element. If it is the case can u suggest me any alternate to <choice> element.
    Can u pls tell what are all changes i need to do in WSDL file to support ABAP proxy generation. 
    Regards
    Rajesh

  • Xml Schema xs:choice element in dynamic forms

    Hi all,
    I'm developing an xml schema for creating the data model of a form. I connect LC Designer-8.2ES to this schema.
    In the schema I do have mutually exclusive elements implemented with a <xs:choice> element. A very comparable situation was described in this thread : http://www.acrobatusers.com/forums/aucbb/viewtopic.php?id=123 in 2007.
    The problem, as related in this thread, is that only the very first element of the choice is displayed in the generated pdf and I don't know how to display all parts as a real choice.  So what's the best way to let user fill in one part or the other of the choice?
    Does it need to be implemented with scripting (xfa...myform.presence = visible | hidden)?
    I want that only the filled element of the choice be exported from the form, the resulting xml being valid according the schema. I seems to work, but as of now, only for the first element...
    BTW, what's the best document describing what parts of xml schema are usable in dynamic XFA forms?  Is it 100% compatible?  I've observed that the constraints in my schema are not validated in the forms.  Shouldn't xml schema generate validating script in LCD? Does it apply for a subset of xml schema?
    Thanks in advance,
    jgrd

    Hi all,
    finally, I understand that we cannot use "anonymous" sequences neither in LiveCycle (like this following example where person might have many email)
        <xs:element name="person">
            <xs:complexType>
                <xs:sequence maxOccurs="unbounded">
                    <xs:element name="email" type="xs:string"/>
                </xs:sequence>
            </xs:complexType>
        </xs:element>
    valid instance with 3 emails :
    <person xsi:noNamespaceSchemaLocation="Untitled39.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
        <email>String</email>
        <email>String</email>
        <email>String</email>
    </person>
    In LC Designer, element with same name (<email>) are not used AFAK.  Maybe I'm wrong?
    The same hands with <xs:choice> where only first choice appears in pdf although being present in LC Designer.
    As for sequences, my idea is to produce <email1>, <email2>, etc. in a static schema, before connecting schema's data to LCD.
    Hope someone can show up and tell it's the right way or not.
    Regards
    jgrd

  • Any element with JAXB are always empty

    Hi guys!
    I'm trying to use the any element to specify some content for my web service. My XML schema contains this:
    <complexType name="casObject">
      <sequence>
        <element name="type"     type="string"/>
        <element name="key"          type="long"     nillable="true" />
        <any namespace="##targetNamespace" minOccurs="0" maxOccurs="unbounded" processContents="lax"/>
      </sequence>
    </complexType>I'm using jaxb 1.6 and it provides a method to get my any elements. In my example: List fieldList = casObject.getAny();
    The schema validation doesn't complain, the logging interceptor shows that the additional elements (from any element) are transfered, but the list is always empty. Any idea why this list is always empty?
    I've also have a question to the xsi:type element and jaxb in the web service forum called "missing xsi:type", maybe it it fits better in this forum. Please take a look.
    http://forum.java.sun.com/thread.jspa?threadID=743719&tstart=0
    Cheers,
    Ingo

    Hi Achim,
    According to my knowledge, there are no known problems with a "required Extended Protection" / "Always On" / "Livelink Server" combination.
    Extended Protection helps to prevent an authentication relay attack by using service binding and channel binding. We need to note that when Extended Protection is set to
    Required, only connections from protected applications on protected operating systems are accepted. This setting is the most secure but connections from operating systems or applications that do not support Extended Protection will not be able
    to connect to SQL Server. For more details, please review the following article.
    Connect to the Database Engine Using Extended Protection
    https://msdn.microsoft.com/en-us/library/ff487261(v=sql.110).aspx
    Thanks,
    Lydia Zhang
    If you have any feedback on our support, please click
    here.
    Lydia Zhang
    TechNet Community Support

  • BPELProcess - Assign Activity - xsd choice element difficulties

    Hi,
    I am trying to copy values from a pipe ("|") delimited text file that has been picked - up by a file adaptor and converted into xml of form (C1,C2,C3,...,Cn). My problem arises when I need to populate an xsd:choice element with C5 & C6 as the same type. If you need more info just let me know, Please advise...
    Kind Regards,
    Warren.

    well, lets say ur looking at the 'Copy Rules' screen, my converted string delimited file is on the left and the xsd im copying to is the right+ :
    body                             body
    spiLine                           ServiceOrder
    C1 ------------------- orderType
    C2 ------------------- refrence number
    ... +choice
    +equipment
    C5 ------------------ value
    C6
    if you can make any sense of this, what I need is to create another equipment node to assign C6 too, in the xsd:choice element...

  • XSL transformations - choice element

    Hi all,
    Need inputs in doing xslt transformations on a choice element. Please provide helpful urls/inputs.
    My xsd(similar one):-
    <xs:element name="Root">
                        <xs:complexType>
                             <xs:choice minOccurs="0" maxOccurs="1">
                                  <xs:element name="field1" type="xs:string"></xs:element>
                                  <xs:element name="field2" type="xs:string"></xs:element>
                                  <xs:element name="field3" type="xs:string"></xs:element>
                                  <xs:element name="field4" type="xs:string"></xs:element>
                             </xs:choice>
                        </xs:complexType>
    Required output:-
    <Root>
    <field1>message</field1>
    </Root>
    or
    <Root>
    <field2>message</field2>
    </Root>
    or
    <Root>
    <field3>message</field3>
    </Root>
    But when i do transformations the output is shown below. How could I get the above input?
    <Root>
    <field1>message</field1>
    <field2/>
    <field3/>
    <field4/>
    </Root>
    Please let me know

    Hi,
    Do you use the "transformation" activity of the BPEL ?
    If yes then you can check two things :
    - That the option of the XSL map doesn't generate empty node for all unmapped nodes
    - That you have an if condition checking if the node exist before mapping it.
    regards,
    mathieu

  • Choice element

    I have XSD with choice element. How to create javacript which will hide one section and show other?

    I'm actually working on an almost identical situation. Supposedly you can use subform sets with the appropriate bindings and only the right data will show. I've been unsuccesful so far. Anyone care to offer a suggestion?
    Thanks!
    Ryan D. Lunka
    Cardinal Solutions Group
    [email protected]

  • Remove XML element with JAXB

    Hi all,
    does anyone knows if it's possible to remove an xml element after that element has been set ? Using only jaxb if possible and not using other technology, for example DOM.
    I explain:
    umarshall car -->setOwner("me"); setSpeed("80"); -->marshall car
    will result into:
    <car>
    <owner>me</owner>
    <speed>80</speed>
    </car>
    I would like something that for example
    unmarshall car -->remove(speed); ....-->marshall car
    would result into:
    <car>
    <owner>me</owner>
    </car>
    could someone point out a way to do that ?
    thanks in advance...

    Okay, after peering over your code and trying a few things out I see one immediate problem and one possible improvement.
    The problem lies in this:
    1. if condition is true, remove item
    2. check recursively
    The problem is .. if an item is removed, the following recursive check will always fail. However, the entire loop is wrapped into a try..catch, so InDesign will not alert you that it failed. Instead, it will continue with what's after the loop, exactly because the try..catch is around the entire loop!
    Change the loop code to this
    if((elm.xmlElements[i].markupTag.name == "http") && (elm.xmlElements[i].parent.markupTag.name == "extlink"))
        var Store_CitAttri = elm.xmlElements[i].xmlAttributes.item("c_style").value;
        if(Store_CitAttri == "URL")
          elm.xmlElements[i].remove();
           foundtext = foundtext + 1;
           continue;
    Query_Remove(elm.xmlElements[i]);
    so the recursive checking is skipped. You can also remove the entire try..catch block, as this may hide additional errors ...
    The improvement is: as I started reading this thread from the top again, shouldn't you be removing the "extlink" items, rather than just the "http" ones inside?
    If so, remove the parent of the found item (which is always the "extlink"):
          elm.xmlElements[i].parent.remove();
    -- and, as this will break the loop (because you just removed the set of elements it was working in!), replace 'continue' with 'return'.
    Hope this helps

  • Using selectedIndex of UIX choice element?

    I'm a bit embarrased that I can't figure this out - it's probably very simple.
    I have a messageChoice element on a UIX page, and I'd like to render the page differently based on which option is currently selected. To do this, I figure I can just use an event handler to maintain a value in the page state, tie the event handler to the messageChoice element, and use a switcher referencing that value on the page state to choose between the different sets of elements I want to render.
    I added a <primaryClientAction> element to the messageChoice element, a <fireAction> element to that, and tied the event to an event handler. All of this is correct, and I can verify that the event handler runs via a breakpoint and the debugger.
    I just can't figure out how to pass the selected index to the event handler! I assume you just add a parameter to the event, but I haven't the slightest clue how to reference the selectedIndex attribute of the messageChoice element from within the UIX page.
    I've been searching for hours! Not sure what's wrong with me, but I can't find the solution.
    A little help would be hugely appreciated =]
    -Matt

    Here are some examples that should help you. I have to go fix a high priority bug right now, so I can't mock up a choice example:
    <lovChoice name="lovChoiceName" prompt="hello" tip="this is a tip"
                                            destination="lovChoice_DemoDlg.uix" selectedValue="${sessionScope.userDataForLovChoice.favoriteVacation.location}">
      <contents   childData="${sessionScope.userDataForLovChoice.vacationSpots}">
      <option text="${uix.current.location}" value="${uix.current.location}"/>
      </contents>
    <primaryClientAction>
    <firePartialAction targets="selectedValueTextID selectedValueTextID2 selectedValueTextID3 lovChoiceID"
                                                             event="lovChoiceUpdate"/>
    </primaryClientAction>
    </lovChoice>and the event handler calls a java method:
        <event name="lovChoiceUpdate">
          <method class="oracle.cabo.servlet.demo.lovchoice.LovChoiceEvents"
                  method="handleLovChoiceUpdateEvent"/>
        </event>and this method gets the parameter:
       * handleLovChoiceUpdateEvent
       * @param context the current baja context
       * @param Page the current page
       * @param event the event that got us here
       * @return The event result containing all the parameters
      public static EventResult handleLovChoiceUpdateEvent(
        BajaContext bc,
        Page page,
        PageEvent event)
        HttpSession sess = bc.getServletRequest().getSession();
        UserData uData = _getUserData(sess);
        String selectedLocation = (String)event.getParameter("lovChoiceName");
        if (uData != null && selectedLocation != null)
          VacationSpot favVacation =  uData.findVacationSpot(selectedLocation);
          uData.setFavoriteVacation(favVacation);
        return null;
      }  To do it simpler, you can do something like this:
    In the following example the page property named "disclosed" is updated to the event source. Notice that data binding is supported.
    <set target="${uix.pageProp}"
    property="disclosed"
    value="${param.source}" />
    In the following example the session attribute identified by the event source is updated to the event name.
    <set target="${sessionScope}"
    property="${param.source}"
    value="${param.event}" />
    (I got this information from the UIX Element Reference).
    Here's an example I found for hide/show:
                 <hideShow id="hideShow-2" >
                  <boundAttribute name="disclosed" >
                   <comparison type="equals" >
                    <defaulting>
                     <dataObject select="hideShow-2"
                                 source="${uix.pageState}" />
                     <fixed text="hide" />
                    </defaulting>
                    <fixed text="show" />
                   </comparison>
                  </boundAttribute>
                  <contents>
                   <header text="Other Header">
                    <contents>
                     <header text="Other SubHeader"/>
                    </contents>
                   </header>
                  </contents>
                 </hideShow>
        <event name="hide show">
          <set
                 property="${param.source}" target="${uix.pageState}" value="${param.event}"/>
        </event>Jeanne

  • XML "container" elements and JAXB

    Hi,
    Does anyone know if there is a way to tell the JAXB compiler not to create classes for certain elements which are just containers for a collection of some other elements. For example, suppose the resultant XML (snippet) is like this:
    <library>
    <books>
      <book .... />
      <book .... />
      <book .... />
    </books>
    </library>What I want to accomplish is tell JAXB compiler to create Library class like this:
    public class Library {
    private Collection books;
    }Currently, what would happen is that JAXB would create Library class like this:
    public class Library {
    private Books books;
    }and then create another class Books like this:
    public class Book {
    private ArrayList book;
    public ArrayList getBook();
    }Obviously, when working with Java code, what I would want is to skip all this nonsense in the middle and just have it the way I showed it in the first example.
    Of course, one solution is not to declare the "books" container element in the schema. However, what I want to know if this is the only solution or there is a way to customize JAXB to get it to produce a class shown in the very first example.
    Thanks,
    Yaakov.

    I believe this question is cross-posted and already answered in http://forums.java.net/jive/forum.jspa?forumID=46

  • Creating empty-tag-elements with JAXB?

    Hi,
    is there any possibility to force JAXB to create empty-tag-elements? For example
    <exampletag attribute="value" />
    instead of
    <exampletag attribute="value">
    </exampletag>.
    I really need to close my tags in the described way but have found no possibility to do so.
    Thanks for your help
    Daniel

    Maybe this will help. I take advantage of the following behavior of the JAXB Marshaller to give me the form of output I require.
    When a class (element) has "null" content, the output is of the form <tagger id="Unique"/>. When it has "empty" content, the output is of the form <tagger id="Unique"></tagger>.
    Example code snippets:
    For "null" content:
    @XmlRootElement(name = "tagger")
    public class TagClose
      public void setId(String id) { this.id = id; }
      public String getId() { return this.id; }
      @XmlValue
      String content = null;
      @XmlAttribute(name="id")
      String id = null;
    }For "empty" content:
    @XmlRootElement(name = "tagger")
    public class TagClose
      public void setId(String id) { this.id = id; }
      public String getId() { return this.id; }
      @XmlValue
      String content = "";
      @XmlAttribute(name="id")
      String id = null;
    }

  • My screen has changed and text boxes suddenly around all subjects and elements of screen?

    Faint black lines/boxes suddenly appear and now all text and major sections of screen are surrounded with lines. My guess is that is either FF or Microsoft setting. If so I haven't found it. HG

    Can you attach a screenshot?
    *http://en.wikipedia.org/wiki/Screenshot
    *https://support.mozilla.org/kb/how-do-i-create-screenshot-my-problem
    *Use a compressed image type like PNG or JPG to save the screenshot
    *Make sure that you do not exceed the maximum size of 1 MB
    Start Firefox in <u>[[Safe Mode|Safe Mode]]</u> to check if one of the extensions (Firefox/Tools > Add-ons > Extensions) or if hardware acceleration is causing the problem.
    *Switch to the DEFAULT theme: Firefox/Tools > Add-ons > Appearance
    *Do NOT click the Reset button on the Safe Mode start window
    *https://support.mozilla.org/kb/Safe+Mode
    *https://support.mozilla.org/kb/Troubleshooting+extensions+and+themes

  • JAXB generation and XSD choice serious issue

    Helo,
    Im developing a webservice that uses XSD Choice structure. Unfortunately, this must to done with choice because doesnt make sense using sequences this case.
    Ill explain bug using this link:
    http://bdoughan.blogspot.com/2011/04/xml-schema-to-java-xsd-choice.html#comment-form
    this is exactly same problem as me, JAXB in jdeveloper are generating anotations wrong! I cant map the sequence choice to webservice, that is developed from WSDL...
    So, I need some help there, I really need develop this webservice using xsd:choice and cant be done in jdeveloper and dont know why.
    I tried put the anotations like this URL but when I call the service, choice element on request was null!
    thanks

    Hi, i dont know why but when I use JAXB to generate a sample XMl I got this output:
    <guiaRequest xmlns="http://www.myservices.gov.br/mensagem/integracaobancaria/guia">
    <parametrosConsultaGuia>
    <guiaNormalRequest>
    <codigoEntidade>B83C15C173633890E0330A67021B3890</codigoEntidade>
    <codigoPorte>6</codigoPorte>
    <codigoAssunto>148</codigoAssunto>
    <numeroTransacaoInternet>267472003</numeroTransacaoInternet>
    </guiaNormalRequest>
    </parametrosConsultaGuia>
    </guiaRequest>
    This is correct to my webservice, BUT, when I invoque webservice with xsd:choice I got this request (i see that on enterprise manager) :
    <message>
    <properties>
    <property name="tracking.compositeInstanceId" value="80367" />
    <property name="tracking.ecid" value="0000J1pyNtnBDC^5lVg8yZ1DtZWJ002D4z" />
    <property name="transport.http.remoteAddress" value="10.106.14.162" />
    </properties>
    <parts>
    <part name="request" >
    <ns2:guiaNormalRequest>
    <ns2:codigoEntidade>B83C15C173633890E0330A67021B3890</ns2:codigoEntidade>
    <ns2:codigoPorte>6</ns2:codigoPorte>
    <ns2:codigoAssunto>148</ns2:codigoAssunto>
    <ns2:numeroTransacaoInternet>267472003</ns2:numeroTransacaoInternet>
    </ns2:guiaNormalRequest>
    </part>
    </parts>
    </message>
    This is wrong! see the structure is not correct.

  • JAXB: using choice to have a list

    I'm going a bit crazy here trying to get JAXB to do what I want. I'm also going crazy trying to get this forum to display my posts, so I'm leaving out the code. The problem I'm having is when I want to have a list with more than one type of element in the list. I'm using a choice element in my schema with maxOccurs="unbounded". The problem is when I marshall the tags of the listed elements are missing. Their children show up, unfortunately now they are the children of the parent of the list! Unmarshalling works fine. Is this a problem with JAXB, or am I misusing the choice element?

    anyone can extend a hand to give us a hint?

  • How to access the JAXB generated methods of Complex element

    Hi all,
    I am generating the java classes from the a XSD file which contains the Complex element , which again contains the simple elements. JAXB is generating the interface and public static class for the inner Complex element. But i not able to create the object of this inner class using the Object factory class. Then without object how can i access the setter and getter methods contained in this complex element.
    My XSD file looks like -
    <xs:element name="SSDecisionActivity">
    <xs:complexType >
    <xs:sequence>
    <xs:element name="Id" type="xs:ID"/>
    xs:element name="ConditionFlow">
         <xs:complexType>
         <xs:sequence>
         <xs:element name="Condition" type="xs:string"/>
         <xs:element name="DecisionCriteria" type="xs:string" minOccurs="2" maxOccurs="unbounded"/>
    How shall i access the methods from the ConditionFlow (Complex element) like setCondition(....),getCondition().
    If anybody knows plz tell me the way.
    Ravi

    I'm a bit confused about this design approach.
    [Bindable] public var storyList:IdmlStory = null; 
    The reason why the above line fails to compile in StoryList.mxml is that a variable of the same name already exists. You have specified a List with an id of storyList. The translation process will yield:
    var storyList:List = new List();
    and then fill in the properties.

Maybe you are looking for

  • Error while Configuring Repository INS0017: Installation of the seeded data

    I am getting error while configuring repository at 36% Error: Seeding Failed: The warehouse builder workspace owner installation failed on user OWBSYS. INS0017:Installation of the seeded data failed java.io.FileNotFoundException: xmlClasses.xml (Acce

  • P3P and app server

    Does anyone have any config info for implementing P3P policies on an application server? thanks a lot

  • Last column in JTable detaches from edge of JScroll Pane

    i have a JTable in a JScrollPane which is in half of a JSplitPane. The table has autoResizeMode set to AUTO_RESIZE_OFF to make the horizontal scrollbar appear. However, when i resize the split pane to make the table bigger, the edge of the last colum

  • URL decode street addresses from PHP

    Hi there, I had a php programmer write me a script to download information from a local real estate board, and it works great, but we had to have it download to an xml file using urlencode in php (there were characters in the listings that caused pro

  • 2 into 1 ?

    I have a Lowe TV - incredibly expensive with excellent picture BUT it has only 1 HDMI input socket and I've currently got a BluRay player using that. Is there any device which will let connect the HDMI output from an Apple TV as well so I can use bot