OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

wsrf message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: Re: [wsrf] Discussion regarding issue 48



I've talked to Jarek about issue 48. What we would like to see is a
clarification of what to return when a property is declared nillable and
it is nil. Our suggestion is to return something like 

<nillablerp xsi:nil="true"/>

Other alternatives are to return nothing or to throw a fault. The other
issue that should be clarified is the precedence of

"Note: in the case where the resource property element is defined with
minOccurs="0" and the resource properties document does not contain any
value for that resource property, the response MUST be an empty
wsrpw:GetResourcePropertyResponse element."

over whatever behavior we decide on for the nillable case. Our
suggestion is to give the minOccurs="0" rule precedence.

More comments below:

On Thu, 2004-06-10 at 14:31, Murray, Bryan P. wrote:
> The minutes indicate I have an action item to start an email discussion
> to clarify issue 48. This issue was originally raised by Jarek Gawor.
> 
> I am not sure whether the original intent is with reference only to
> properties that are declared in schema as nillable or if it is about any
> property which can possibly have a null value.
> 
> As an implementer I can comment on properties that can have a null
> value. For instance, in most languages a string can have a non-null
> value, can be empty and non-null, and can have a null value. If the
> property is not declared as nillible in schema and minOccurs > 0, what
> is the correct value to return if the string has a null value? The
> choices in this case are 1) return property with no value, 2) don't
> return the property at all but don't fault, 3) fault. I don't think we
> can return the property with nil=true. My preference is #1 which is the
> same if the string has a non-null value that has 0 length.

I think we should return a fault since it is not declared as nillable.

> Another case I can think of that is related to having a null value is a
> property that is declared with minOccurs=0 and maxOccurs > 1. This may
> sometimes be implemented as an array. What should be done if the array
> is null, empty, or non-null and non-empty? It seems to me that if the
> array is null no property elements should be returned just as for an
> array with no elements, but this is an implementation detail.
> 

It seems to me that this should depend on whether the property is
declared to be nillable or not. My suggestion would be:

      * Nillable
              * if array == null or empty return <rpelement
                xsi:nil=true>
              * if array is not empty do the usual
      * Non-nillable
              * if array == null or empty throw fault
              * if array is not empty do the usual 

/Sam

> If someone has comments about properties that are declared as nillable
> in the schema or comments about properties having null values please
> reply to the list.
> 
> Bryan
-- 
Sam Meder <meder@mcs.anl.gov>
The Globus Alliance - University of Chicago
630-252-1752




[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]