Bug 974020

Summary: wsprovide.sh generates xsd violating XML Schema specification
Product: [JBoss] JBoss Enterprise Application Platform 6 Reporter: Jiri Sedlacek <jsedlace>
Component: Web ServicesAssignee: Jim Ma <ema>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.1.0CC: asoldano, ema, myarboro, oskutka, rsvoboda
Target Milestone: ER1   
Target Release: EAP 6.2.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-12-15 16:16:17 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 991240    
Bug Blocks:    
Attachments:
Description Flags
reproducer
none
src none

Description Jiri Sedlacek 2013-06-13 09:57:56 UTC
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.

Comment 1 Jiri Sedlacek 2013-06-13 09:58:22 UTC
Created attachment 760539 [details]
src

Comment 2 Rostislav Svoboda 2013-06-13 10:02:10 UTC
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>.

Comment 3 Jiri Sedlacek 2013-06-13 10:24:57 UTC
command I used for generating: 

jboss-eap-6.1/bin/wsprovide.sh -o . -w -c reproducer.jar org.jboss.soa.qa.shared.service.InventoryService

Comment 4 Rostislav Svoboda 2013-06-13 11:33:48 UTC
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>

Comment 5 Jim Ma 2013-06-25 11:14:00 UTC
Tghis is an issue in apache cxf: 
https://issues.apache.org/jira/browse/CXF-5089

Comment 6 Jim Ma 2013-06-28 03:11:29 UTC
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 11:48:39 UTC
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