java - Jaxb2marshaller - using contextPath and classesToBeBound -
is possible? have service may need marshal objects significant number of projects, each several object factories. specify few specific classes need marshalled on regular basis. can add list of contexts other projects, keep current list of classes? or have 1 or other?
with many individual classes may need marshalled, smarter use list of contextpaths?
no can not combine these approaches, checked against such usage in public final void afterpropertiesset() in jaxb2marshaller class. there in spring 3.1 property can used, called packagestoscan, accepts wildcards (com.foo.*.schemas), can provide list of such expressions.
but 1 thing should know, doesn't work classes without known annotation @xmlrootelement because of method private boolean supportsinternal(class<?> clazz, boolean checkforxmlrootelement) in jaxb2marshaller, return false elements without annotation.
good luck.
Comments
Post a Comment