Hello,
I am using CXF with RESTful services, configured with Spring. My
request objects (parameters to my service methods) and response
objects (return types on my service methods) have a common structure,
so I created some base classes with common members, which the actual
request and response objects I use and declare as types in my service
interface method signatures, and have discovered something
horrible...which I hope is something only as horrible as my lack of
knowledge on how to change the default behavior. Apparently, all
members defined on the base classes are ignored when the
serialization / deserialization binding occurs, and I receive
NullPointerExceptions. If I take all the members defined in my base
classes and stuff them into their subclasses, everything works fine.
Obviously, this is a bad scene, as it requires me to duplicate code
across every request and response object, respectively.
How do I alter the CXF behavior (using JAXB) so that I can have my
request and response types extend from base classes and have those
base class members serialize and deserialize properly?
Thanks,
Brad
- Base class members not serializing / deserializing Brad O'Hearne
-