cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From snigs2081 <>
Subject Marshalling error - String[]
Date Mon, 25 Jul 2011 07:32:22 GMT
I am returning an object in a webservice, which in turn has a Map&lt;String,
Object&gt; ; Object  because the value can be of any type.

My adapter class looks like this - 

public class DataCursorAdapter extends XmlAdapter&lt;DataMap, Map&lt;String,
Object&gt;> {
	public DataMap marshal(Map&lt;String, Object&gt; v) throws Exception {
		DataMap map = new DataMap();
		for (Map.Entry&lt;String, Object&gt; e : ((Map&lt;String, Object&gt;)
v).entrySet()) {
			DataMap.DataEntry ide = new DataMap.DataEntry();
		return map;

	public Map&lt;String, Object&gt; unmarshal(DataMap v) {
		Map&lt;String, Object&gt; map = new LinkedHashMap&lt;String, Object&gt;();
		try {
			for (DataMap.DataEntry e : v.getEntries()) {
				map.put(e.getKey(), e.getValue());
		} catch (Exception e) {
		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?

Thanks in advance! 

View this message in context:
Sent from the cxf-user mailing list archive at

View raw message