Using JAXB binding extensions in wsimport

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' 
+1
java jax-ws jaxb wsimport jax-ws-customization
Sep 22 '16 at 13:28
source share

No one has answered this question yet.

See similar questions:

fifty
Creating a JAXB class that implements an interface
one
JAXB wsimport required files this is possible (implements the interface). Said it was

or similar:

9
xjc / wsimport - JAXB binding is ignored
four
cdata in jax-ws / wsimport
2
Provider based endpoint for weblogic
one
JAXB wsimport required files this is possible (implements the interface). Said it was
one
JAXB issue: XMLTransform name typeName prefix not working
one
Getting the XML directory for working with wsimport. JAX-WS RI 2.1.6 in JDK 6
0
external jaxws binding file not used at run time
0
unexpected XML tag release with Jax Ws client
0
Why doesn't my build work when using jaxws-maven-plugin?
0
Can I migrate existing JAX-RPC web services to JAX-WS without any modifications to the WSDL or domain model?



All Articles