users@jaxb.java.net

RE: Digest for list users_at_jaxb.java.net

From: Lulseged Zerfu <lulseged.zerfu_at_ericsson.com>
Date: Mon, 26 Nov 2012 07:33:41 +0000

Hi

 Seems that I have filled in all children and their children. But it is always complaining about Invalid content:

 This happens both for Create and Set:

All elements and their children are complete.

cvc-complex-type.2.4.a: Invalid content was found starting with element 'mc:createMMTel'. One of '{"http://schemas.ericsson.com/cai3g1.2/":CreateMODefinition}' is expected. at line -1 column -1


        public Create createCreate(String moType, String id)
        {
                Create create = cai3gDocument.createCreate(moType);

                AnyMOIdType anyMOIdType = cai3gDocument.getFactory().createAnyMOIdType();
                anyMOIdType.getAny().add(factory.createPublicId(id));
                JAXBElement<AnyMOIdType> anyMOIdTypeElement = cai3gDocument.getFactory().createCreateMOId(anyMOIdType);
                create.setMOId(anyMOIdTypeElement);

                CreateMMTel mmtel = factory.createCreateMMTel();

                mmtel.setPublicIdentityAttribute(id);

                mmtel.setPublicIdentityElement(factory.createCreateMMTelPublicId(id));

                Create.MOAttributes attributes = cai3gDocument.getFactory().createCreateMOAttributes();

                attributes.setCreateMODefinition(factory.createCreateMMTel(mmtel));

                create.setMOAttributes(cai3gDocument.getFactory().createCreateMOAttributes(attributes));

                return create;
        }

Or unmarshalling the following XML content results in the same error:

cvc-complex-type.2.4.a: Invalid content was found starting with element 'mc:createMMTel'. One of '{"http://schemas.ericsson.com/cai3g1.2/":CreateMODefinition}' is expected. at line 12 column 52

<cai3g:Create xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:cai3g="http://schemas.ericsson.com/cai3g1.2/"
        xmlns:mc="http://schemas.ericsson.com/mtas/mmtel/cai3g" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://schemas.ericsson.com/cai3g1.2/ ../xsd/cai3g1.2.xsd http://schemas.ericsson.com/mtas/mmtel/cai3g ../xsd/mmtel-aggregated-service.xsd">

        <cai3g:MOType>MMTel@http://schemas.ericsson.com/mtas/mmtel/cai3g</cai3g:MOType>

        <cai3g:MOId>
                <mc:publicId>sip:user_at_ericsson.com</mc:publicId>
        </cai3g:MOId>

        <cai3g:MOAttributes>
                <mc:createMMTel publicId="sip:user_at_ericsson.com">

                        <mc:publicId>sip:user_at_ericsson.com</mc:publicId>

                        <mc:communication-diversion>
                                <mc:cdiv-operator-configuration>
                                        <mc:cdiv-op-conditions>
                                                <mc:not-registered-condition>activated</mc:not-registered-condition>
                                        </mc:cdiv-op-conditions>
                                </mc:cdiv-operator-configuration>
                                <mc:cdiv-user-configuration>
                                        <mc:active>true</mc:active>
                                        <mc:cdiv-ruleset>
                                                <mc:cdiv-rule id="cfb">
                                                        <mc:cdiv-conditions>
                                                                <mc:cdiv-call-state>not-registered</mc:cdiv-call-state>
                                                        </mc:cdiv-conditions>
                                                </mc:cdiv-rule>
                                        </mc:cdiv-ruleset>
                                </mc:cdiv-user-configuration>
                        </mc:communication-diversion>

                </mc:createMMTel>
        </cai3g:MOAttributes>
</cai3g:Create>


I wonder if this is a JAXB problem or not.

Thank you for your help.

BR
Lulseged

-----Original Message-----
From: users-request_at_jaxb.java.net [mailto:users-request_at_jaxb.java.net]
Sent: den 24 november 2012 01:33
To: users_at_jaxb.java.net
Subject: Digest for list users_at_jaxb.java.net

Table of contents:

1. RE: Abstract - Lulseged Zerfu <lulseged.zerfu_at_ericsson.com> 2. XJC @XmlElement question - Markward Schubert <markward.schubert_at_gmail.com> 3. Re: Abstract - Wolfgang Laun <wolfgang.laun_at_gmail.com> 4. Re: XJC @XmlElement question - Wolfgang Laun <wolfgang.laun_at_gmail.com>