Hi
I am trying to work some code on the lines on the following example
(https://jaxb.dev.java.net/nonav/2.1.6/docs/api/javax/xml/bind/annotation/XmlElementRef.html)
 

>From what I see in the above example it should be possible to work with
abstract class as "TYPE" using JAXB and CXF. I am trying the following
example:

1) SearchFilter class having SearchCondition

@XmlRootElement(name="SearchFilter")
@XmlAccessorType(value = XmlAccessType.FIELD)

public class SearchFilter {
        @XmlElementRef(name="conditions")
        List<SearchCondition> conditions = new ArrayList<SearchCondition>();

2) SearchCondition is an abstract class
public  abstract class   SearchCondition {
                
        public SearchCondition () {}
        public  abstract String stringify(Map<String, String> map) ;

3) EqualSearchCondition  is an example of SearchCondition
@XmlRootElement(name="EqualSearchCondition")
public class EqualSearchCondition extends SearchCondition{

I am running on tomcat 5.5.17, CXF2.1.1 , jaxb-impl2.1.6. On startup Tomcat
shows the following error

Caused by: com.sun.xml.bind.v2.runtime.IllegalAnnotationsException: 1 counts
of
IllegalAnnotationExceptions
XmlElementRef points to a non-existent class.

what am I missing? is this any known issue with CXF 2.1.1 ? 

Thanks 

-Rajeev.

-- 
View this message in context: 
http://www.nabble.com/XmlElementRef-and-abstract-class-example-with-CXF-tp19645102p19645102.html
Sent from the cxf-user mailing list archive at Nabble.com.

Reply via email to