Well, hmm. You've sent me JAXB annotations but told me that you are using Aegis.
My first suggestion is to try 2.2.1. I got rid of the use of JDOM unless you ask for it specially in 2.2. However, I think that you'll still be unhappy with the 'any' if it's still there. If so, please file a JIRA with a reproducible test case and I'll see if I can track down why the generic parameter doesn't pull the type into the schema. On Mon, May 11, 2009 at 11:12 AM, chris9955 <[email protected]> wrote: > > We're using version 2.1.3 > > > > bimargulies wrote: > > > > what version of cxf? > > > > On May 8, 2009, at 6:45 PM, chris9955 <[email protected]> wrote: > > > >> > >> I have a class defined as: > >> [code] > >> @XmlAccessorType(XmlAccessType.FIELD) > >> @XmlType(name = "PagedResultSet") > >> public class PagedResultSet<T extends Serializable> implements > >> Serializable > >> { > >> ... > >> public void setResults(List<T> results) > >> { > >> _results = results; > >> } > >> > >> public Long getTotalResults() > >> { > >> return _totalResults; > >> } > >> } > >> [/code] > >> > >> I do the following in my test code: > >> [code] > >> PagedResultSet<CSxxxBusinessSummary> resultSet = > >> _svc.findBusiness(tempCriteria, 0, 10); > >> > >> assertNotNull(resultSet); > >> assertFalse(resultSet.getResults().isEmpty()); > >> List<CSxxxBusinessSummary> summaries = resultSet.getResults(); > >> assertNotNull(summaries); > >> assertFalse(summaries.isEmpty()); > >> for(CSxxxBusinessSummary busSummary: summaries) > >> { > >> assertNotNull(busSummary); > >> } > >> > >> [/code] > >> and I get a class cast exception: > >> java.lang.ClassCastException: org.jdom.Document cannot be cast to > >> ca.xxx.xxx.cs.csxxx.CSxxxBusinessSummary > >> > >> and in the logs: > >> INFO org.apache.cxf.aegis.type.TypeUtil - > >> xsi:type="{http://csxxx.cs.xxx.xxx.ca}CSxxxBusinessSummary" was > >> specified, > >> but no corresponding Type was registered; defaulting to > >> {http://www.w3.org/2001/XMLSchema}anyType<http://www.w3.org/2001/XMLSchema%7DanyType> > >> > >> Any help to fix this would be appreciated. > >> > >> Thanks, > >> > >> Chris. > >> -- > >> View this message in context: > >> > http://www.nabble.com/AEGIS-binding-problem-generics-tp23454863p23454863.html > >> Sent from the cxf-user mailing list archive at Nabble.com. > >> > > > > > > -- > View this message in context: > http://www.nabble.com/AEGIS-binding-problem-generics-tp23454863p23485326.html > Sent from the cxf-user mailing list archive at Nabble.com. > >
