Created attachment 760538 [details] reproducer It generates this construct: <xs:element nillable="true" ref="tns:simpleOrder"/> which is not allowed by specification, if the ref attribute is used in element tag, nillable cannot be there. Classes the wsdl is generated from are attached, with sources.
Created attachment 760539 [details] src
http://www.w3.org/TR/xmlschema-1/ 3.3.3 Constraints on XML Representations of Element Declarations Schema Representation Constraint: Element Declaration Representation 2.2 If ref is present, then all of <complexType>, <simpleType>, <key>, <keyref>, <unique>, nillable, default, fixed, form, block and type must be absent, i.e. only minOccurs, maxOccurs, id are allowed in addition to ref, along with <annotation>.
command I used for generating: jboss-eap-6.1/bin/wsprovide.sh -o . -w -c reproducer.jar org.jboss.soa.qa.shared.service.InventoryService
I checked apache-cxf-2.7.5 and I see the same thing there too. /home/rsvoboda/Downloads/apache-cxf-2.7.5/bin/java2ws -d cxf-based -wsdl -cp reproducer.jar org.jboss.soa.qa.shared.service.InventoryService <xs:complexType name="OrderException"> <xs:sequence> <xs:element nillable="true" ref="tns:simpleOrder"/> <xs:element nillable="true" ref="tns:item"/> </xs:sequence> </xs:complexType>
Tghis is an issue in apache cxf: https://issues.apache.org/jira/browse/CXF-5089
CXF-5089 is resolved, and will be released in cxf 2.6.9 and cxf 2.7.6.
EAP 6.2.0 ER1 and ER2 are using apache cxf 2.7.6. https://issues.apache.org/jira/browse/CXF-5089 was fixed in 2.5.11, 2.6.9, 2.7.6, 3.0.0. Issue verified