CXF and XmlJavaTypeAdapter annotation at the method level

View: New views
2 Messages — Rating Filter:   Alert me  

CXF and XmlJavaTypeAdapter annotation at the method level

by Eric Ma :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Am using CXF 2.2.4, JAX-WS frontend, JAXB databinding.

I know with JAXB, I need to create XmlJavaTypeAdapters to handle Map types.  This works great when the annotation is at the field level.  However, when I annotated my SEI and implementation class at the method level, I am getting CXF exception caused by javax.xml.bind.JAXBException: java.util.Map is not known to this context.

BTW, the Adapter is a static inner class in the SEI.

Any ideas?

Eric

Re: CXF and XmlJavaTypeAdapter annotation at the method level

by dkulp :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Wed November 4 2009 5:44:25 pm Eric Ma wrote:
> Am using CXF 2.2.4, JAX-WS frontend, JAXB databinding.
>
> I know with JAXB, I need to create XmlJavaTypeAdapters to handle Map types.
> This works great when the annotation is at the field level.  However, when
>  I annotated my SEI and implementation class at the method level, I am
>  getting CXF exception caused by javax.xml.bind.JAXBException:
>  java.util.Map is not known to this context.
>

Make sure you have asm 2.3.x or 3.x on the classpath.   That's required for
using the @Xml* annotations on the method/params.

Dan


> BTW, the Adapter is a static inner class in the SEI.
>
> Any ideas?
>
> Eric
>

--
Daniel Kulp
dkulp@...
http://www.dankulp.com/blog