users@jaxb.java.net

Is java.util.Map supported in JAXB 2.0

From: raags <apparna_at_gmail.com>
Date: Sun, 30 Mar 2008 17:41:08 -0700 (PDT)

Hi, I'm new to JAXB and I noticed a problem when I deployed a web service
which had a method that returned a Map. JAXB threw an error stating that Map
is an interface, and JAXB does not support interfaces.
@WebMethod
public Map<String, String> findAllXYZ(HashMap map)
{
   return map;
}

JAXB spec states this..
8.5.4 Collections
The following collection must be supported:
 java.util.Map and its subtypes (e.g. java.util.HashMap)
 java.util.Collection and it’s subtypes (e.g. java.util.List)

Can someone throw any light on this issue please?

Thanks,
Raags
-- 
View this message in context: http://www.nabble.com/Is-java.util.Map-supported-in-JAXB-2.0-tp16389809p16389809.html
Sent from the java.net - jaxb users mailing list archive at Nabble.com.