Hi
Thanks.
How should it look like?
BR
Lulseged
________________________________
From: Farrukh Najmi [mailto:farrukh_at_wellfleetsoftware.com]
Sent: den 14 december 2012 17:58
To: users_at_jaxb.java.net
Subject: Re: SubstitutionGroup and inheritance
This may be off-topic but if my experience is that Type Substitution in schema instead of Element substitution (aka Subsitution Group) works much better with JAXB and other binding tools. If you have control over the schema then consider replacing Subsitution Groups with Type Substitution in schema.
On 12/14/2012 05:03 AM, Lulseged Zerfu wrote:
Hi
Thanks for your support.
I have changed to java 6 and get same problem.
JAXB expects CreateMODefinition, CreateMODefinition is abstract and should not be expected, right?
2012-12-14 10:40:18,308 ERROR [com.ericsson.ims.mtas.xdms.common.binder.GenericBinder 169] - <cvc-complex-type.2.4.a: Invalid content was found starting with element 'createMMTel'. One of '{"
http://schemas.ericsson.com/cai3g1.2/"<
http://schemas.ericsson.com/cai3g1.2/>:CreateMODefinition}' is expected. at line 13 column 49>
[org.xml.sax.SAXParseException: cvc-complex-type.2.4.a: Invalid content was found starting with element 'createMMTel'. One of '{"
http://schemas.ericsson.com/cai3g1.2/"<
http://schemas.ericsson.com/cai3g1.2/>:CreateMODefinition}' is expected.]
I am trying to unmarshall service.xml which is valid document´. I get same problem when marshalling as well.
How should it look like if it is not valid?
Do you see any problem in the schemas?
Is this a JAXB problem?
createMMTel is of type AbstractCreateAttributeType
BR
Lulseged
________________________________
From: Mikhail Balanov [mailto:realsonic3_at_gmail.com]
Sent: den 7 december 2012 08:40
To: users_at_jaxb.java.net<mailto:users_at_jaxb.java.net>
Subject: Re: SubstitutionGroup and inheritance
Hello Lulseged,
Can you provide stack trace?
I've come accross an NPE when I worked with Java 7, but my code is working in Java 6 fine.
On 7 December 2012 11:23, Lulseged Zerfu <lulseged.zerfu_at_ericsson.com<mailto:lulseged.zerfu_at_ericsson.com>> wrote:
Hi
I have tried all my best to use JAXB and am not able to fix my problem.
My question is if JAXB supports inheritance or not.
The code generated by JAXB from a schema looks correct. But marshalling and unmarshalling results always in an exception.
BR
Lulseged
--
Regards,
Farrukh Najmi
Web: http://www.wellfleetsoftware.com