cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Benson Margulies" <>
Subject choice versus map
Date Tue, 21 Aug 2007 21:00:31 GMT
We've got an API that associates from a class to an object of the class.
It's not unlike some of the insides of CXF in this regard. It depends on


T getAnnotation(Class<T> classOfAnnotation)


We're trying to export this as a web service via CXF.


Mediocre alternative #1:


     Use the @XmlElement annotation that specifies a choice for the XSD,
and simply return a Set<Object> marked up as a set of the limited set of
possible classes noted in the @XmlElement.


This is not so hot, as the caller now has to crawl around in the Set or
List or whatever to find the item of the desired class.


We were hoping to cook up a way to express 


   Map<String, Object>, and provide the class names as the keys. We
can't figure out the @XmlElement magic that would support this, if any.
Any JAX-WS experts out there with a clue, or the word that there is no


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message