attributes task force progress report wsd attributes task force november 4 th, 2003 wsdl f2f

12
Attributes Task Force Progress Report WSD Attributes Task Force November 4 th , 2003 WSDL F2F

Upload: brandon-larson

Post on 27-Mar-2015

225 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: Attributes Task Force Progress Report WSD Attributes Task Force November 4 th, 2003 WSDL F2F

Attributes Task Force Progress Report

WSD Attributes Task Force

November 4th, 2003

WSDL F2F

Page 2: Attributes Task Force Progress Report WSD Attributes Task Force November 4 th, 2003 WSDL F2F

Directions From Last F2F

• Requirements From the WG:– No Additions To Component Model– Use style attribute to mark operations for

“attribute” access, ie getter/setters.– Only Individual Access operations be defined

by WSDL wg

• Present it today

Page 3: Attributes Task Force Progress Report WSD Attributes Task Force November 4 th, 2003 WSDL F2F

Results

• No New Components in the Component Model• Attribute Concept =>

“Data Query Methods” for GEDs

• We introduce two different style URIs• Even proved syntactic sugar is possible for ease of

development

Page 4: Attributes Task Force Progress Report WSD Attributes Task Force November 4 th, 2003 WSDL F2F

A GED example

<xs:schema targetNamespace="Attributes">

<xs:element name=“XXX">

<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>

Page 5: Attributes Task Force Progress Report WSD Attributes Task Force November 4 th, 2003 WSDL F2F

Style: Get (1)

• Two “wrapper” elements for a GED (attribute) <xs:element name="get_XXX"> </xs:element> <xs:element name="get_XXXResponse"> <xs:complexType> <xs:sequence> <xs:element ref="attrs:XXX"/> </xs:sequence> </xs:complexType> </xs:element>

Page 6: Attributes Task Force Progress Report WSD Attributes Task Force November 4 th, 2003 WSDL F2F

Style: Get (2)

• Operation that uses these two wrapper elements<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>

Page 7: Attributes Task Force Progress Report WSD Attributes Task Force November 4 th, 2003 WSDL F2F

Style: Set (1)• Two “wrapper” elements for a GED in schema<xs:element name="set_XXX">

<xs:complexType>

<xs:sequence>

<!– Single child via reference <xs:element ref="attrs:XXX"/>

</xs:sequence>

</xs:complexType>

</xs:element>

<xs:element name="set_XXXResponse">

</xs:element>

Page 8: Attributes Task Force Progress Report WSD Attributes Task Force November 4 th, 2003 WSDL F2F

Style: Set (2)

• Operation uses the defined “wrapper” elements<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_XXXResponse"/>

</ws:operation>

Page 9: Attributes Task Force Progress Report WSD Attributes Task Force November 4 th, 2003 WSDL F2F

Rules• Let ф represent the name of a GED, e.g. “XXX”.

• Use the name convention for the operations on GED– get_ ф for “readable”

– set_ ф to represent “writeable”.

– Must refer to the same attribute by wrappers (via ref)

• The style attribute has the corresponding value– Get

– Set

• Pattern URI for the operation must be “in/out”

• Wrapper definitions must not contain schema attributes

• The operations may contain {in|out} faults.

Page 10: Attributes Task Force Progress Report WSD Attributes Task Force November 4 th, 2003 WSDL F2F

Syntactic Sugar

• Shortcut extension to generate operations that define get/set style

• Not Required as part of the style, but nice to have. <interface>

<operation name="xs:NCName" pattern=“wsdl:in-out" > <input …> <output …> </operation> <wsdlx:attribute elementReference=“attributes:XXX" access="read-write"/></interface>

Page 11: Attributes Task Force Progress Report WSD Attributes Task Force November 4 th, 2003 WSDL F2F

“Attribute Defn is in Syntactic Sugar not in Component Model

<xs:element name="attribute"> <xs:complexType> <xs:attribute name="elementReference" type="xs:QName" use="required"/> <xs:attribute name="access" type="attributes:accessValues" use="required"/> </xs:complexType> </xs:element> <xs:simpleType name=“accessValues"> <xs:restriction base="xs:string”> <xs:enumeration value="read"/> <xs:enumeration value="write"/> <xs:enumeration value="read-write"/> </xs:restriction> </xs:simpleType>

Page 12: Attributes Task Force Progress Report WSD Attributes Task Force November 4 th, 2003 WSDL F2F

Result• Simple

• Consistent with RPC style, can be used with language bindings (but not limited to)

• No new components!

• Also a well defined syntactic sugar exists to make use of “attribute” definition shortcut:

http://lists.w3.org/Archives/Public/public-ws-desc-state/2003Oct/0021.html

• Allows more complicated styles to be built