I don't know but did you check a with-quotes Google of
"java.util.ArrayList nor any of its super class is known to this
context"? It's a common problem that brings back over a thousand hits,
so a solution is probably already on the 'Net.
Glen
On 07/25/2011 03:32 AM, snigs2081 wrote:
Hi,
I am returning an object in a webservice, which in turn has a Map<String,
Object> ; Object because the value can be of any type.
My adapter class looks like this -
public class DataCursorAdapter extends XmlAdapter<DataMap, Map<String,
Object>> {
public DataMap marshal(Map<String, Object> v) throws Exception {
DataMap map = new DataMap();
for (Map.Entry<String, Object> e : ((Map<String,
Object>)
v).entrySet()) {
DataMap.DataEntry ide = new DataMap.DataEntry();
ide.setKey(e.getKey());
ide.setValue(e.getValue());
map.getEntries().add(ide);
}
return map;
}
public Map<String, Object> unmarshal(DataMap v) {
Map<String, Object> map = new LinkedHashMap<String,
Object>();
try {
for (DataMap.DataEntry e : v.getEntries()) {
map.put(e.getKey(), e.getValue());
}
} catch (Exception e) {
e.printStackTrace();
}
return map;
}
}
When the value is of type String[] or ArrayList, I get a marshalling error
org.apache.cxf.interceptor.Fault: Marshalling Error: class
java.util.ArrayList nor any of its super class is known to this context.
Could anyone pls guide as to how this problem can be resolved?
--
Glen Mazza
Application Integration Division
Talend (http://www.talend.com/ai)
blog: http://www.jroller.com/gmazza