I know how to include extensions in a simple JAXB bindings file - list them in the root element of extensionBindingPrefixes :
<jaxb:bindings version="1.0" xmlns:jaxb="http://java.sun.com/xml/ns/jaxb" xmlns:xjc="http://java.sun.com/xml/ns/jaxb/xjc" jaxb:extensionBindingPrefixes="xjc" ...>
However, this attribute is not placed in the JAX-WS bindings file.
<jaxws:bindings version="2.0" xmlns:jaxws="http://java.sun.com/xml/ns/jaxws" xmlns:jaxb="http://java.sun.com/xml/ns/jaxb" xmlns:xjc="http://java.sun.com/xml/ns/jaxb/xjc" wsdlLocation="../wsdl/schema.wsdl" ...>
It cannot be in the root or in any of the nested jaxb:bindings elements.
How should you enable extension binding?
Examples of command line arguments used by jaxws-maven-plugin: 2.4.1:
-keep -s 'target/generated-sources/wsimport' -d 'target/classes' -encoding UTF-8 -extension -Xnocompile -B-XJsr303Annotations -B-Xvalue-constructor -B-Xinheritance -b 'src/jaxws/bindings.xml' 'src/wsdl/schema.wsdl'
java jax-ws jaxb wsimport jax-ws-customization
OrangeDog Sep 22 '16 at 13:28 2016-09-22 13:28
source share