users@jaxb.java.net

RE: Re: Can not unmarshall

From: Lulseged Zerfu <lulseged.zerfu_at_ericsson.com>
Date: Tue, 28 Jul 2009 22:10:13 +0200

many thanks

________________________________

From: Wolfgang Laun [mailto:wolfgang.laun_at_gmail.com]
Sent: den 27 juli 2009 12:48
To: users_at_jaxb.dev.java.net
Subject: Re: Can not unmarshall


The user-profileType containes a <xs:sequence>, and each of its elements
is optional (minOccurs="0"). But it is ordered, so as soon as you
actually have one (e.g. "communication-types"), only those defined as
following it are accepted afterwards.

If elements may appear in any order, you may use <xs:all>; combining
<sequence><choice><element>... might be another option.

-W



On Mon, Jul 27, 2009 at 12:10 PM, Lulseged Zerfu
<lulseged.zerfu_at_ericsson.com> wrote:


        Hi
         
        I have a problem unmarshalling a document:
         
        It works when the communication-addresses attribute is at the
top of the document.
         
        If it is else where in the document other then the top, it fails
to unmarshall.
         
        The following is error reported:
         
        Source : 38.29: cvc-complex-type.2.4.a: Invalid content was
found starting with element 'communication-addresses'. One of
'{"urn:oma:xml:xdm:user-profile":hobbies,
"urn:oma:xml:xdm:user-profile":favourite-links,
WC[##other:"urn:oma:xml:xdm:user-profile"]}' is expected.
         
        <communication-addresses>
           <comm-addr>+1 858 623 0743</comm-addr>
           <comm-addr>asmith_at_omaorg.org</comm-addr>
           <comm-addr>sip:alice_at_example.com
<mailto:sip%3Aalice_at_example.com> </comm-addr>
        </communication-addresses>
         
        Is thi sa bug or is there anything wrong with the schema or the
document?
         
        It should not matter where this attribute is located in the
document.
         
        Thanks as always!
         
         

        
---------------------------------------------------------------------
        To unsubscribe, e-mail: users-unsubscribe_at_jaxb.dev.java.net
        For additional commands, e-mail: users-help_at_jaxb.dev.java.net