> Without a concrete class identified, how
> would the program decide which implementation of a list or map should be
> used?

I don't think that is the problem. If it can do it for Map<String, String>,
why
can't it do it for Map<String, Object>? Why does one need to change from
Map<String, String> to HashMap<String, Object>?


On Tue, Apr 1, 2014 at 6:42 AM, Aaron Titus <[email protected]> wrote:

> List and Map are interfaces.  Without a concrete class identified, how
> would the program decide which implementation of a list or map should be
> used?   I know this can be handled with custom deserialization/
> serialization but I thought I saw somewhere that there would be a way to do
> it by declaring it via binding syntax?  I can't seem to put my finger on it
> at the moment ...
>
>
> On Tue, Apr 1, 2014 at 12:29 PM, Al Eridani <[email protected]> wrote:
>
> > Thank you, Mark, for your reply.
> >
> > > However with
> > > *java.lang.Object*- what XML Schema type could that correspond to in
> > > order to get
> > > serialized/deserialized to by JAXB?
> >
> > Well, I've found out that JAXB is able to do it, anyway.
> >
> > The error message reminded me that in the past there had been problems
> > with serialization of interfaces. So, in desperation, I changed the
> Map<,>
> > to HashMap<,> and afterwards the error message changed to
> >
> > class java.util.ArrayList nor any of its super class is known to this
> > context.
> >
> > So, I changed the List<> to ArrayList<> in the signature of the web
> service
> > method and now the web service works again.
> >
> > Of course, this "solution" is extremely ugly, so if somebody has some
> > suggestions on how to fix the problem without resorting to signatures
> with
> > concrete classes, please share your insights.
> >
> > Thanks!
> >
> >
> >
>

Reply via email to