This service will be undergoing maintenance at 00:00 UTC, 2017-10-23 It is expected to last about 30 minutes
Bug 974020 - generates xsd violating XML Schema specification generates xsd violating XML Schema specification
Product: JBoss Enterprise Application Platform 6
Classification: JBoss
Component: Web Services (Show other bugs)
Unspecified Unspecified
unspecified Severity medium
: ER1
: EAP 6.2.0
Assigned To: Jim Ma
Depends On: 991240
  Show dependency treegraph
Reported: 2013-06-13 05:57 EDT by Jiri Sedlacek
Modified: 2015-08-02 19:43 EDT (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2013-12-15 11:16:17 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
reproducer (6.48 KB, application/x-java-archive)
2013-06-13 05:57 EDT, Jiri Sedlacek
no flags Details
src (1.86 KB, application/x-compressed-tar)
2013-06-13 05:58 EDT, Jiri Sedlacek
no flags Details

  None (edit)
Description Jiri Sedlacek 2013-06-13 05:57:56 EDT
Created attachment 760538 [details]

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.
Comment 1 Jiri Sedlacek 2013-06-13 05:58:22 EDT
Created attachment 760539 [details]
Comment 2 Rostislav Svoboda 2013-06-13 06:02:10 EDT

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>.
Comment 3 Jiri Sedlacek 2013-06-13 06:24:57 EDT
command I used for generating: 

jboss-eap-6.1/bin/ -o . -w -c reproducer.jar
Comment 4 Rostislav Svoboda 2013-06-13 07:33:48 EDT
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

  <xs:complexType name="OrderException">
      <xs:element nillable="true" ref="tns:simpleOrder"/>
      <xs:element nillable="true" ref="tns:item"/>
Comment 5 Jim Ma 2013-06-25 07:14:00 EDT
Tghis is an issue in apache cxf:
Comment 6 Jim Ma 2013-06-27 23:11:29 EDT
CXF-5089 is resolved, and will be released in cxf 2.6.9 and cxf 2.7.6.
Comment 10 Rostislav Svoboda 2013-09-20 07:48:39 EDT
EAP 6.2.0 ER1 and ER2 are using apache cxf 2.7.6. was fixed in  2.5.11, 2.6.9, 2.7.6, 3.0.0. 

Issue verified

Note You need to log in before you can comment on or make changes to this bug.