On Sep 13, 2012, at 6:46 PM, purecharger <[email protected]> wrote: > I recently upgraded to CXF 2.6.2 from 2.2.5 and many of my services are not > working with a ClassCastException when unmarshalling a SOAP response. > > Given the following interface: > > public Collection<Foo> getListOfFoo(int bar); > > implementation: > > public Collection<Foo> getListOfFoo(int bar) { > Collection<Foo> ret = new ArrayList<Foo>(); > // populate ret > return ret; > } > > I get the following exception at the client when unmarshalling the reponse: > > Exception: [Lcom.company.Foo; cannot be cast to java.util.Collection > > If I change the return type to List<Foo>, it works fine. Why is this > happening, and what can I do to keep the declared return type as Collection?
Any chance of getting a test case? Also, do you have an asm jar on the classpath? That may be required for this. Dan > > Thank you, > Ryan > > > > > -- > View this message in context: > http://cxf.547215.n5.nabble.com/Collection-marshalled-as-array-tp5713929.html > Sent from the cxf-user mailing list archive at Nabble.com. -- Daniel Kulp [email protected] - http://dankulp.com/blog Talend Community Coder - http://coders.talend.com
