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?
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.