You are viewing a plain text version of this content. The canonical link for it is here.
Posted to muse-dev@ws.apache.org by "Dan Jemiolo (JIRA)" <ji...@apache.org> on 2006/12/09 21:41:21 UTC
[jira] Updated: (MUSE-159) Schema validation fails for NonNilable
ResourceProperties, when child elements of the resource properties are
optional (minOccours="0")
[ http://issues.apache.org/jira/browse/MUSE-159?page=all ]
Dan Jemiolo updated MUSE-159:
-----------------------------
Fix Version/s: 2.1.0
I believe this was fixed in the current build - it came up when trying to debug a problem with WSSG MembershipContentRules. Can you check?
> 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: muse-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: muse-dev-help@ws.apache.org