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



>In any case, for maxOccurs=0 do we return a empty reply in the case of
>this RP document:

><foo:RPDocDecl>
>  <foo:bar xsi:nil="true" />
> ...
></foo:RPDocDecl>

>or do we return

><wsrp:GetResourcePropertyResponse>
>    <foo:bar xsi:nil="true" />
></wsrp:GetResourcePropertyResponse>

>/Sam
It strikes me that for the RPDocDecl you have, the response is

<wsrp:GetResourcePropertyResponse>
   <foo:bar xsi:nil="true" />
</wsrp:GetResourcePropertyResponse>

An empty reply seems to me only the case where there is absolutely no element named foo:bar in the RPDocDecl, ie:
<foo:RPDocDecl>
... <!-- no foo:bar -->
</foo:RPDocDecl>

sgg
++++++++
Steve Graham
(919)254-0615 (T/L 444)
STSM, On Demand Architecture
Member, IBM Academy of Technology
<Soli Deo Gloria/>
++++++++



Samuel Meder <meder@mcs.anl.gov>

06/15/2004 06:14 PM
Please respond to meder

       
        To:        Steve Graham/Raleigh/IBM@IBMUS
        cc:        "Murray, Bryan P." <bryan.murray@hp.com>, Jarek Gawor <gawor@mcs.anl.gov>, wsrf-oasis <wsrf@lists.oasis-open.org>
        Subject:        Re: [wsrf] Discussion regarding issue 48



On Tue, 2004-06-15 at 15:55, Steve Graham wrote:
> Interesting.
>
> So, lets say I have the following resource property definition:
>
> <xs:schema ... targetNamespace="foo" ... xmlns:foo="foo" >
> ...
>   <xs:element name="bar" type="xs:String" nillable="true"/>
>
>   <xs:element name="RPDocDecl">
>     <xs:sequence>
>       <xs:element ref="bar" minOccurs="1" maxOccurs="unbounded" />
> ...
>     </xs:sequence>
>   </xs:element>
> ...
> </xs:schema>
>
> I have a WS-Resource defined on a portType that references
> foo:RPDocDecl as its resource properties document schema, and this
> particular WS-Resource has only one element value of "bar" that is
> nil. That is, a serialization of the resource property document could
> appear as:
>  
> <foo:RPDocDecl>
>   <foo:bar xsi:nil="true" />
>  ...
> </foo:RPDocDecl>
>
> So, if a requestor issued the following GetResource Properties
> request:
>
>   <wsrp:GetResourceProperty>
>     foo:bar
>   </wsrp:GetResourceProperty>
>
> I would expect:
>
>   <wsrp:GetResourcePropertyResponse>
>     <foo:bar xsi:nil="true" />
>   </wsrp:GetResourcePropertyResponse>
>
> Now a couple of other "variants":
>
> There are several values of bar, that is the resource properties
> document looks like:
> <foo:RPDocDecl>
>   <foo:bar xsi:nil="true" />
>   <foo:bar>someString</foo:bar>
>  ...
> </foo:RPDocDecl>
>
> I would expect the getResourceProperties response to look like:
>
>   <wsrp:GetResourcePropertyResponse>
>     <foo:bar xsi:nil="true" />
>     <foo:bar>someString</foo:bar>
>   </wsrp:GetResourcePropertyResponse>
>
> and if there are no values for foo:bar, that is the resource
> properties document looks like:
> <foo:RPDocDecl>
> ...
> </foo:RPDocDecl>
>
> I would expect the getResourceProperties response to look like:
>
>   <wsrp:GetResourcePropertyResponse>
>   </wsrp:GetResourcePropertyResponse>
>
> What aspect of the scenario am I missing that suggests the invention
> of some conventional element like "nillablerp"?

My nillablerp is equivalent to your foo:bar. I did not mean to imply a
convention, I was just using the name to indicate that it represents a
nillable rp.


In any case, for maxOccurs=0 do we return a empty reply in the case of
this RP document:

<foo:RPDocDecl>
 <foo:bar xsi:nil="true" />
...
</foo:RPDocDecl>

or do we return

<wsrp:GetResourcePropertyResponse>
   <foo:bar xsi:nil="true" />
</wsrp:GetResourcePropertyResponse>

/Sam

> sgg
> ++++++++
> Steve Graham
> (919)254-0615 (T/L 444)
> STSM, On Demand Architecture
> Member, IBM Academy of Technology
> <Soli Deo Gloria/>
> ++++++++
>
>
>
>
> Samuel Meder
> <meder@mcs.anl.gov>
>
> 06/15/2004 02:05 PM
> Please respond to meder
>        
>         To:      
> "Murray, Bryan P."
> <bryan.murray@hp.com>
>         cc:      
> wsrf-oasis
> <wsrf@lists.oasis-open.org>, Jarek Gawor <gawor@mcs.anl.gov>
>         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
>
--
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]