wsdlvalidator ignores WSDL constraints on element order
-------------------------------------------------------
Key: CXF-2680
URL: https://issues.apache.org/jira/browse/CXF-2680
Project: CXF
Issue Type: Bug
Components: Tooling
Affects Versions: 2.2.5
Reporter: Dennis Sosnoski
When running WSDLToJava with the -validate flag a WSDL with elements in
incorrect order is accepted without complaint. In the example tested, the
wsdl:service element precedes the wsdl:types element. This is a violation of
the WSDL 1.1 schema definition, which defines the wsdl:definitions element
structure as:
<complexType name="definitionsType">
<complexContent>
<extension base="wsdl:documented">
<sequence>
<element ref="wsdl:import" minOccurs="0" maxOccurs="unbounded"/>
<element ref="wsdl:types" minOccurs="0"/>
<element ref="wsdl:message" minOccurs="0" maxOccurs="unbounded"/>
<element ref="wsdl:portType" minOccurs="0"
maxOccurs="unbounded"/>
<element ref="wsdl:binding" minOccurs="0" maxOccurs="unbounded"/>
<element ref="wsdl:service" minOccurs="0" maxOccurs="unbounded"/>
<any namespace="##other" minOccurs="0" maxOccurs="unbounded">
<annotation>
<documentation>to support extensibility elements
</documentation>
</annotation>
</any>
</sequence>
<attribute name="targetNamespace" type="uriReference"
use="optional"/>
<attribute name="name" type="NMTOKEN" use="optional"/>
</extension>
</complexContent>
</complexType>
If there's going to be a -validate flag it should perform a proper validation
of the WSDL. I realize it's common for implementations to accept invalid WSDL
of this type, but there should at least be a warning generated so that users
will realize their WSDL is not actually valid.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.