users@jaxb.java.net

Re: Is java.util.Map supported in JAXB 2.0

From: Wolfgang Laun <wolfgang.laun_at_gmail.com>
Date: Sat, 25 Apr 2009 09:53:48 +0200

Be more specific. Do you want to customize a schema, or do you want to do
this by annotations to existing Java classes? What's the type of the Set<?>
element? What XML representation do you have?
-W

On Fri, Apr 24, 2009 at 12:43 PM, slrosh <snrpriyadarshana_at_yahoo.com> wrote:

>
>
> Hi... I am new to JAXB... I want to know how to write a wrapper class for
> java.util.Set collection...
>
>
>
> Felipe Gaucho wrote:
> >
> > XML Schema does not support Maps :(
> >
> > you must create your own wrapper to represent a Map as XML data
> >
> > On Mon, Mar 31, 2008 at 2:41 AM, raags <apparna_at_gmail.com> wrote:
> >>
> >> 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.
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: users-unsubscribe_at_jaxb.dev.java.net
> >> For additional commands, e-mail: users-help_at_jaxb.dev.java.net
> >>
> >>
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe_at_jaxb.dev.java.net
> > For additional commands, e-mail: users-help_at_jaxb.dev.java.net
> >
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/Is-java.util.Map-supported-in-JAXB-2.0-tp16389809p23213785.html
> Sent from the java.net - jaxb users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jaxb.dev.java.net
> For additional commands, e-mail: users-help_at_jaxb.dev.java.net
>
>