Using JAXB to generate XML binding classes.
The schema is based on a set of legacy XML files, and includes this snippet:
<xs:complexType name="MetaType">
<xs:simpleContent>
<xs:extension base="xs:string">
<xs:attribute type="xs:string" name="Name" />
<xs:attribute type="xs:string" name="Scheme" />
<xs:attribute type="xs:string" name="Value" />
</xs:extension>
</xs:simpleContent>
</xs:complexType>
The 'Value' attribute conflicts with the 'value' property of xs:string
, and the code generation fails with the error:
com.sun.istack.SAXParseException2: Property "Value" is already defined. Use <jaxb:property> to resolve this conflict.
I had a problem using the solution with Eclipse (tried both Helios SR1 and Juno SR1) and CXF 2.6.3. The solution was similar to what Kaitsu says. Namely the New > Web Service wizard of Eclipse copies the wsdl into the foldre WebContent/wsdl. I had to place the wsdl and the binding file there myself. Otherwise the binding file gave the "is not a part of this compilation" error.
I wasn't able to use an inline schema in the WSDL but it did work with an external schema like in answer #1.
I'm using the CXF Servlet endpoint config option. In my WSDL I have:
The wizard generated this into my web.xml, which works ok:
But it put this into cxf-servlet.xml:
I had to change the address into the full URL, like this: