I have a custom binding file as shown below:
<?xml version="1.0" encoding="UTF-8"?>
<jaxws:bindings node="wsdl:definitions/wsdl:types/xsd:schema"
xmlns:jaxws="http://java.sun.com/xml/ns/jaxws"
xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<jaxb:globalBindings>
<jaxb:serializable/>
</jaxb:globalBindings>
</jaxws:bindings>
I call wsdl to java using the following:
<java classname="org.apache.cxf.tools.wsdlto.WSDLToJava" fork="true"
failonerror="true" errorproperty="stderror.out">
<arg value="-all" />
<arg value="-b" />
<arg value="conf/custom-binding.xml" />
<arg value="-d" />
<arg value="gen-src" />
<arg value="-verbose" />
<arg value="wsdl/mywsdl.wsdl" />
<classpath>
<path refid="cxf.classpath" />
</classpath>
</java>
It seems the custom binding is working for WSDLs where the schema is
located inside the WSDL. However, the custom bindings seem to be
ignored when the WSDL imports the schema. The custom binding file is
processed since errors appear if the xml is not well formed, they are
not applied to the generated files.
Any ideas what I need to do to get the cutom bindings applied to source
generated from an imported schema?
Thanks.