Re: [public-ws-desc-state] <none>

VAMBENEPE,WILLIAM (HP-Cupertino,ex1) wrote:

>Resending after correcting a bullet numbering error that I had introduced.
>
>William
>

Hi William,

I just found  a tiny bug in the spec. Possibly a cut and paste error.

See below.

>
>  
>
>>-----Original Message-----
>>From: public-ws-desc-state-request@w3.org 
>>[mailto:public-ws-desc-state-request@w3.org] On Behalf Of 
>>VAMBENEPE,WILLIAM (HP-Cupertino,ex1)
>>Sent: Monday, October 27, 2003 11:43 AM
>>To: public-ws-desc-state@w3.org
>>Subject: [public-ws-desc-state] <none>
>>
>>
>>
>>Based on the discussion on the call this morning, here is a 
>>slightly edited
>>version of the getter/setter style document. I added 3-b-ii 
>>and 3-b-iii. How
>>does the wording look to you?
>>
>>Regards,
>>
>>William
>>
>>
>>
>>
>>    
>>
>
>  
>
>
> ------------------------------------------------------------------------
>
> The Attribute Getter/Setter Pattern:
>
>  
>
> Roberto Chinnici, Steve Graham, Umit Yalcinalp, Oct 6, 2003
>
> (edited by William Vambenepe on Oct 27, 2003)
>
>  
>
> The following are the rules associated with the attributes "style" of 
> demarcating getter/setter operations in WSDL 2.0. These rules 
> represent sgg's notes and recollection of discussion on the ATF 
> telecon of Oct 6, 2003.
>
>  
>
> Roberto posted an "example" collection of XML fragments [1].  The 
> contents of this email are included here.
>
>  
>
> 1.      The attribute itself can be any XML Global Element Definition.
>
> // this is the attribute
>
>  
>
> <xs:schema targetNamespace="Attributes">
>
>    <xs:element name="YYY">
>
>      <xs:complexType>
>
>        <xs:sequence>
>
>          <xs:element name="a" type="xsd:int"/>
>
>          <xs:element name="b" type="xsd:float"/>
>
>        </xs:sequence>
>
>      </xs:complexType>
>
>    </xs:element>
>
> </xs:schema>
>
>  
>
> 2.      Attributes are exposed in the component model using specially 
> marked Operations: 
>
> // these are the operations
>
>  
>
> <ws:definitions targetNamespace="MyService">
>
>  
>
>    <ws:interface name="MyInterface"
>
>             xmlns:wrappers="Wrappers">
>
>  
>
>      <ws:operation
>
>           name="get_XXX"
>
>           style="http://www.w3.org/@@@@/@@/wsdl/style/get-attribute"
>
>           pattern="http://www.w3.org/@@@@/@@/wsdl/in-out">
>
>        <ws:input name="in" body="wrappers:get_XXX"/>
>
>        <ws:output name="out" body="wrappers:get_XXXResponse"/>
>
>      </ws:operation>
>
>  
>
>      <ws:operation
>
>           name="set_XXX"
>
>           style="http://www.w3.org/@@@@/@@/wsdl/style/set-attribute"
>
>           pattern="http://www.w3.org/@@@@/@@/wsdl/in-out">
>
>        <ws:input name="in" body="wrappers:set_XXX"/>
>
>        <ws:output name="out" body="wrappers:set_XXX"/>
>
>      </ws:operation>
>
>  
>
>    </ws:interface>
>
> </ws:definitions>
>
>  
>
> a.       The name of the operations must follow a pattern:
>
>                                                    i.      get_? (for 
> the getter operation) and set_? (for the setter operation).
>
>                                                  ii.      ? should be 
> the name of the attribute, but need not be.  Reasons for this include: 
> namespace collisions (same attribute, different namespaces would yield 
> operation namespace collisions).
>
> b.      The value for @style of the get operation must be: 
> "http://www.w3.org/@@@@/@@/wsdl/style/get-attribute"
>
> c.       The value of the @pattern of the get operation must be:
>
This is the set operation, not get operation. So, (c) should be changed 
to reflect this.

> "http://www.w3.org/@@@@/@@/wsdl/style/set-attribute"
>
> d.      For both the get and set operation, the value of @pattern must 
> be: http://www.w3.org/@@@@/@@/wsdl/in-out
>
> These are the message definitions:
>
> // these are the request and response messages for the getter
>
>  
>
> <xs:schema targetNamespace="Wrappers"
>
>             xmlns:attrs="Attributes">
>
>  
>
>    <xs:element name="get_XXX">
>
>    </xs:element>
>
>  
>
>    <xs:element name="get_XXXResponse">
>
>      <xs:complexType>
>
>        <xs:sequence>
>
>          <xs:element ref="attrs:YYY"/>
>
>        </xs:sequence>
>
>      </xs:complexType>
>
>    </xs:element>
>
>  
>
>    <xs:element name="set_XXX">
>
>      <xs:complexType>
>
>        <xs:sequence>
>
>          <xs:element ref="attrs:YYY"/>
>
>        </xs:sequence>
>
>      </xs:complexType>
>
>    </xs:element>
>
>  
>
>    <xs:element name="set_XXXResponse">
>
>    </xs:element>
>
> </xs:schema>
>
>  
>
>  
>
> 3.      The values of the in and out messages must follow these rules:
>
> a.       The "attribute" associated with the get or set operation is 
> identified by:
>
>                                                    i.      The XML GED 
> identified by the @ref of the element within the get response message 
> or the @ref of the element within the set request message. The Qname 
> value of the @ref in either case uniquely identifies the attribute
>
> b.      For any given value of ?, the attribute associated with the 
> get_? and set_? operation MUST be the same
>
>                                                    i.      It is 
> illegal to have operations named get_ ? and set_ ? where the attribute 
> associated with those operations are different
>
>                                                  ii.      If there is 
> both a getter and a setter for an attribute, they must be called get_? 
> and set_?  with the same value of ?.
>
>                                                 iii.      There cannot 
> be more than one getter or more than setter associated with the same 
> attribute.
>
> 4.      the actual messages of the get and set operations must follow 
> these rules:
>
> a.       The element corresponding to the get request body element 
> must have empty content and must not include any XML attribute.
>
> b.      The element corresponding to the get response body element 
> must contain a single child element. The child element must reference 
> the attribute's XML global element definition. The child element 
> contains the current value of the attribute. The child element must 
> not include any XML attribute.
>
> c.       The element corresponding to the set request body element 
> must contain a single child element. The child element must reference 
> the attribute's XML global element definition. The child element 
> contains the "new" value of the attribute which "replaces" any 
> previous value. The child element must not include any XML attribute.
>
> d.      The element corresponding to the set response body element 
> must have empty content and must not include any XML attribute.
>
> e.       The response of the get message or set message may contain 
> outfault child elements.
>
>  
>
>  
>
>  
>
>  
>
>  
>
>  
>
>  
>
>  
>
> [1] 
> http://lists.w3.org/Archives/Public/public-ws-desc-state/2003Oct/0005.html
>

-- 
Umit Yalcinalp                                  
Consulting Member of Technical Staff
ORACLE
Phone: +1 650 607 6154                          
Email: umit.yalcinalp@oracle.com

Received on Tuesday, 28 October 2003 19:34:12 UTC