I have a binding file like this
For Apache CXF users, the cleanest way is to use the -p
option offered by wsdl2java
.
-p [wsdl-namespace=]PackageName
Specifies zero, or more, package names to use for the generated code. Optionally specifies the WSDL namespace to package name mapping.
In our case
-p http://www.w3.org/2001/XMLSchema=org.acme.foo
If you use the cxf-codegen-plugin, then just add another pair of
.
org.apache.cxf
cxf-codegen-plugin
${cxf.version}
[...]
-p
http://www.w3.org/2001/XMLSchema=org.acme.foo
[...]
No need for a targetNamespace pointing at the reserved XSD namespace and no need for catch-all jaxb package binding.