I've figured this out by tracing invocations of JAXBContext.newInstance(). It
seems that there is a built-in mechanism for this purpose in JAXB. Generated
port interface contains @XmlSeeAlso({ObjectFactory.class}), but you can
refer there to classes for all of your recognized extensions. Having
processed this annotation CXF adds everything you've got there to JAXB
context. You also need to put @XmlRootElement to classes which represent
top-level types of extensions.

The only drawback is that when you generate classes from WSDL you need to
manually edit them afterwards to refer to recognized extensions, which
effectively means that you have to keep generated code under the version
control.
-- 
View this message in context: 
http://cxf.547215.n5.nabble.com/Using-elements-from-extra-XSD-schema-for-any-extensions-tp3279551p3281003.html
Sent from the cxf-user mailing list archive at Nabble.com.

Reply via email to