[ http://issues.apache.org/jira/browse/MUSE-159?page=comments#action_12457375 ] Oliver Waeldrich commented on MUSE-159: ---------------------------------------
I checked this issue against the latest version from the trunk, but it remains unresolved. > Schema validation fails for NonNilable ResourceProperties, when child > elements of the resource properties are optional (minOccours="0") > --------------------------------------------------------------------------------------------------------------------------------------- > > Key: MUSE-159 > URL: http://issues.apache.org/jira/browse/MUSE-159 > Project: Muse > Issue Type: Bug > Components: WSRF WSRP ResourcePropertyCollection and Capabilities > Affects Versions: 2.0.0 M1, 2.0.0 M2, 2.0.0, 2.1.0 > Reporter: Oliver Waeldrich > Assigned To: Dan Jemiolo > Priority: Minor > Fix For: 2.1.0 > > > I have the following declaration for ResourceProperties in my wsdl-file: > <xs:complexType name="MyPropertiesType"> > <xs:sequence> > <xs:element ref="tns:MyType" /> > </xs:sequence> > </xs:complexType> > <xs:element name="MyType" type="tns:MyType1" /> > <xs:complexType name="MyType1"> > <xs:sequence> > <xs:element ref="tns:MyType2" minOccurs="0" /> > </xs:sequence> > </xs:complexType> > However, the schema validation (validateSchema() in > SimpleResourcePropertyCollection) does not honor that the property may be > empty (e.g. <MyType/>) and recognizes it as nil. Therefore the schema > validation process breaks. > // some sort of "can be empty check" is missing here > if (!isNillable) > { > for (int n = 0; n < instances.length; ++n) > { > // > // check for child elements, attributes, and text, all of > // which qualify an element as "not null" > // > if (!instances[n].hasChildNodes() && > !instances[n].hasAttributes() && > XmlUtils.extractText(instances[n]) == null) > throw new SchemaValidationFault(message); > } > } -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
