Hi ,

CXF only adds the classes that is needed to JaxbContext by reflecting and analyzing method paramter types.
It can not use a search path to discover and load these classes .

If you want to load extra class into JaxbContext , you can write a jaxb.index file to specify them. For example, if com.foo.bar.A.class is the method parameter type, create a file named jaxb.index and place under the same package. Write the extra class name to this file as the following :
--------------jaxb.index-------------
B
C

Cxf will read this file and add com.foo.bar.A and com.foo.bar.C into JaxbContext.

Does it help?

Cheers

Jim Ma

yesitspeter wrote:
My team has had difficulty with CXF being able to discover the entire set of
classes needed for serialization/deserialization using JAXB.  We specify
this rather easily with XFire and have great success with that solution.  We
wish to migrate to CXF however we see no clearly documented method of adding
the context.
I was hoping one of you could point us in the right direction.   I apologize
in advance if this question has already been asked.

Reply via email to