But the problem still there:

[java] Caused by: com.sun.xml.bind.v2.runtime.IllegalAnnotationsException:
1 counts of IllegalAnnotationExceptions
     [java] No element mapping exists for
"http://www.tmforum.org/mtop/fmw/xsd/c
ei/v1":"commonEventInformation"
     [java]     this problem is related to the following location:
     [java]             at
@javax.xml.bind.annotation.XmlElementDecl(namespace=h
ttp://www.tmforum.org/mtop/nra/xsd/alm/v1, defaultValue= ,
substitutionHeadName=
commonEventInformation, scope=class
javax.xml.bind.annotation.XmlElementDecl$GLO
BAL, substitutionHeadNamespace=http://www.tmforum.org/mtop/fmw/xsd/cei/v1,
name=
alarm)
     [java]             at public javax.xml.bind.JAXBElement
org.tmforum.mtop.nr
a.xsd.alm.v1.ObjectFactory.createAlarm(org.tmforum.mtop.nra.xsd.alm.v1.AlarmType
)
     [java]             at org.tmforum.mtop.nra.xsd.alm.v1.ObjectFactory

     [java]     at
com.sun.xml.bind.v2.runtime.IllegalAnnotationsException$Build
er.check(IllegalAnnotationsException.java:66)
     [java]     at
com.sun.xml.bind.v2.runtime.JAXBContextImpl.getTypeInfoSet(JA
XBContextImpl.java:389)
     [java]     at
com.sun.xml.bind.v2.runtime.JAXBContextImpl.<init>(JAXBContex
tImpl.java:236)
     [java]     at
com.sun.xml.bind.v2.ContextFactory.createContext(ContextFacto
ry.java:76)
     [java]     at
com.sun.xml.bind.v2.ContextFactory.createContext(ContextFacto
ry.java:55)
     [java]     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)
     [java]     at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcces
sorImpl.java:39)
     [java]     at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMet
hodAccessorImpl.java:25)
     [java]     at java.lang.reflect.Method.invoke(Method.java:585)
     [java]     at
javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:2
10)
     [java]     at javax.xml.bind.ContextFinder.find(ContextFinder.java:366)
     [java]     at
javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:574)
     [java]     at
org.apache.cxf.jaxb.JAXBDataBinding.createJAXBContext(JAXBDat
aBinding.java:512)
     [java]     at
org.apache.cxf.jaxb.JAXBDataBinding.initialize(JAXBDataBindin
g.java:268)
     [java]     ... 14 more
     [java] Java Result: 1


Response from Mr Daniel:


OK.  This looks like a behavior change in JAXB2.1, but we can work around
it.

Basically, JAXB 2.0 doesn't seem to grab the superclasses of types prior to 
checking the annotations.  Thus, the supertype of the AlarmType 
(EventInformationType and it's superclass CommonEventInformationType) are
not 
available in the context and thus the element isn't available.   

Two ways to deal with it:
1) Use the "extra classes" configuration stuff to configure in the extra 
classes that are needed.  

2) Update the JAXBContextInitializer to walk the parent as well.    I'll get 
this done on the fixes branch.

-- 
View this message in context: 
http://www.nabble.com/CXF-1711-was-really-fixed-in-CXF2.1.2--tp22095694p22095694.html
Sent from the cxf-user mailing list archive at Nabble.com.

Reply via email to