{path} of Property A and the

Metadata for WS-Resources
WS-Resource Metadata Descriptor
OASIS WSRF F2F
Tuesday, October 26th, 2004
Steve Graham
Bryan Murray
Tom Maguire
William Vambenepe
Motivation
• Support a broad and evolving
range of WS-Resource types
– Need to be able to discover the descriptions of these
resources
– Interfaces (described in WSDL)
– Additional descriptors
• The broader the range of WSResources to be supported, the
more descriptive information
required
2
Requirements
• Define an information model
representing metadata about
operations, resource properties and
other information associated with a
WS-Resource interface.
• Define a standard annotation for
associating meta data descriptions
with other description artifacts of the
WS-Resource, particularly its WSDL
3
1.1 portType and its resource
WS-Resource Metadata Descriptor
• Defines a mechanism for providing
additional description on interfaces
and WS-Resource implementations:
– Properties
– Operations
– Extensibility for other descriptions
• Description is required at both:
– design time
• No WS-Resources available (install, provisioning)
• Development of support for new WS-Resources
– execution time
• Introspection of WS-Resources
4
Overview
WS-Resource
Descriptor document
for each portType
Combined by reference
Individual portType
descriptors are
combined via
references into a
document that
specializes the
description of the
interface
Individual resource
types that implement
the port type provides
its own descriptor that
forms a template that
resources of the type
will match
OperatingSystem
descriptor
Combined by copy-and-paste.
Describes OperatingSystem
portType
Implements
Windows2003Server
descriptor
“Canonical”
manageability
portTypes
Canonical
portType
Descriptor
Most derived manageability
portType for a managed
resource. Defines the schema
for the resourceProperties
document that represents the
state of the resource.
Windows2003Server
Managed resource type
LinuxRedHat
Managed resource type
LinuxRedHat
descriptior
Windows2003Server
WS-Resource
LinuxRedHat
WS-Resource
5
Operating System portType
… xmlns:os=”http://example.com/ns/OperatingSystem”
…
<portType name="OperatingSystem“
wsrf-rp:ResourceProperties="os:OSResourceProperties"
The OperatingSystem portType is
wsrf-rp:derivedFrom="id:Identification"
an extension of the Identification
..wsrmd:metadataDescriptor=”os:OperatingSystemDescriptor” portType.
..wsrmd:metadataDescriptorLocation=”http://example.com/ns/OperatingSystem
http://example.com/prototypes/OperatingSystem.wsrmd”>
…
</portType>
The portType annotation for the
Resource Property GED (next
page).
…and
where that
descriptor
is
The prototype
which
corresponds
located.
to this portType.
6
Operating System Property definitions
…
xmlns:os="…
<element name="OSResourceProperties">
<complexType>
<sequence>
<element ref="os:numberOfProcesses" minOccurs="0" maxOccurs="1"/>
<element ref="os:totalSwapSpaceSize" minOccurs="0" maxOccurs="1"/>
<element ref="os:processor" minOccurs="1" maxOccurs="unbounded"/>
</sequence>
</complexType>
</element>
<element name="numberOfProcesses" type="xsd:int" />
<element name="totalSwapSpaceSize" type="xsd:unsignedLong" />
<element name="processor" type="os:Processor" />
<complexType name="Processor">
<sequence>
<element name="processorFamily" type="xsd:string" minOccurs="1" maxOccurs="1" />
<element name="manufacturer" type="xsd:string" minOccurs="1" maxOccurs="1" />
<element name="serialNumber" type="xsd:string" minOccurs="1" maxOccurs="1" />
</sequence>
</complexType>
7
Identification Property definitions
<element name="Identification">
<complexType>
<sequence>
<element ref="ResourceType" minOccurs="0" maxOccurs="1"/>
<element ref="ResourceID" minOccurs="0" maxOccurs="1"/>
</sequence>
</complexType>
</element>
<element name="ResourceType" type="list of xs:anyURI" />
<element name="ResourceID" type="xsd:string" />
8
Identification portType Descriptor
(001) <Definitions
The Definitions
MetadataDescriptor
component
is a for a
(002)
xmlns=”http://docs.oasis-open.org/wsrf/2004/10/wsrf-WS-ResourceMetadataDescriptor-1.0The
component
is a container
container
for a set of metadata
descriptions
draft-01.xsd”
set
of MetadataDescriptor
components.
The and
constraintscomponent
on a WS-Resource.
(003)
xmlns:id=”http://example.com/ns/Identification”
Definitions
defines aThe
MetadataDescriptor
component
contains
(004)
targetNamespace=”http://example.com/ns/Identification”>
targetNamespace
which
forms the
{namespace}
additionalofinformation
that it
describes
(005) <MetadataDescriptor
property
all components
contains.or
constrains various aspects of a WS-Resource.
(006)
name=”IdentificationMetadataDescriptor”
This descriptor corresponds to the
(007)
interface=”id:Identification”
(008)
wsdlLocation=”http://example.com/ns/IdentificationIdentification portType.
(009)
http://example.com/wsdl/Identification.wsdl” >
(010) <Property path=”id:ResourceID”
(011)
mutability=”constant”
…and
it cannot
by
the
The
ResourceID
resource
property
Will
always
havebe
a changed
constant
value
(012)
modifiability=”read-only” />
wsrp:SetResourceProperties
element
of the id:Identification
(013) <Property path=”id:ResourceType”
operation.
resource
property document.
(014)
mutability=”constant”
Path expression defined by the following BNF:
The Identification
portType
is at
The ResourceType
resource
(015)
modifiability=”read-only”
/>
(1) path ::= ResourceProperty
Qualifier
this location.
property element of the
(016) </MetadataDescriptor>
[AttributeIdentifier]
id:Identification resource property
(017)</Definitions>
(2) ResourceProperty ::= Qname
document.
(vc: QName MUST correspond to a resource property
declaration).
(3) Qualifier ::= [‘/’ [Qname | NCName]]*
(vc: the path must locate a node in the descendant axis
of the ResourceProperty element)
(4) AttributeIdentifier ::= / @ [Qname | NCName]
9
(vc: the AttributeIdentifier must identify an attribute
information element contained on the element identified
Operating System portType Descriptor
(001) <Definitions
(002) xmlns=”http://docs.oasis-open.org/wsrf/2004/10/wsrf-WS-ResourceMetadataDescriptor-1.0-draft01.xsd”
(003) xmlns:id=”http://example.com/ns/Identification”
(004) xmlns:os=”http://example.com/ns/OperatingSystem”
This descriptor specializes the
(005) targetNamespace=”http://example.com/ns/OperatingSystem”>
Identification descriptor.
(006) <MetadataDescriptor
(007) name=”OperatingSystemMetadataDescriptor”
(008) interface=”os:OperatingSystem”
This descriptor corresponds to the
(009) wsdlLocation=”http://example.com/ns/OperatingSystem
OperatingSystem portType.
(010)
http://example.com/wsdl/OperatingSystem.wsdl”
(011) specializes=”id:IdentificationMetadataDescriptor”
(012) metadataDescriptorLocation=”http://example.com/ns/Identification
(013)
http://example.com/metadataDescriptors/Identification.wsrmd” >
…
next page Property metadata descriptions
…
The Identification
(037) </MetadataDescriptor>
(038) </Definitions>
MetadataDescriptor is at this
location.
10
Operating System Descriptor Properties
(014)
<Property path=”id:ResourceType”>
(015)
<ValidValues>
(016)
<id:ResourceType>OperatingSystem</id:ResourceType>
This property element augments
(017)
<id:ResourceType>SuSELinux</id:ResourceType>
any property element that may
(018)
<id:ResourceType>IBMzOS</id:ResourceType>
appear in the Identification
(019)
<id:ResourceType>MicrosoftWindows_XP</id:ResourceType>
prototype.
(020)
</ValidValues>
(021)
</Property>
(022)
<Property path="os:numberOfProcesses"
(023)
mutability="mutable"
(024)
modifiability="read-only" />
(025)
<Property path=”os:processor”
The os:numberOfProcesses
mutability=”constant”
resource property elements value
The(026)
set of valid values the
(027)
modifiability=”read-only” />
may change over time.
ResourceType
resource property
(028) may contain
<Property
path=”os:processor/os:processorFamily”>
element
(restrictive)
(029)
associated
with a<ValidValues>
WS-Resource or
(030)
<os:processorFamily>Pentium Family</os:processorFamily>
type OperatingSystem.
(031)
<os:processorFamily>Power PC 750</os:processorFamily>
(032)
<os:processorFamily>68xxxx Family</os:processorFamily>
(033)
<os:processorFamily>IBM390 Family</os:processorFamily>
(034)
<os:processorFamily>G5</os:processorFamily>
(035)
</ValidValues>
(036)
</Property>
11
Windows XP WS-Resource Descriptor
(001) <Definitions
xmlns=”http://docs.oasis-open.org/wsrf/2004/10/wsrf-WS-ResourceMetadataDescriptor-1.0draft-01.xsd”
(003) xmlns:id=”http://example.com/ns/Identification”
(004) xmlns:os=”http://example.com/ns/OperatingSystem”
(005) targetNamespace=”http://example.com/ns/OperatingSystem/WinXP”>
(006) <MetadataDescriptor
(007) name=”WindowsXPPrototype”
(008) interface=”os:OperatingSystem”
(009) wsdlLocation=”http://example.com/ns/OperatingSystem
(010)
http://example.com/ns/OperatingSystem.wsdl”
(011) specializes=”os:OperatingSystemMetadataDescriptor”
(012) metadataDescriptorLocation=”http://example.com/ns/OperatingSystem
(013)
http://example.com/metadataDescriptors/OperatingSystem.wsrmd” >
…
next page Property metadata descriptions
…
(002)
(026) </MetadataDescriptor>
(027) </Definitions>
12
Windows XP WS-Resource Properties
(014)
(015)
(016)
(017)
(018)
(019)
(020)
(021)
(022)
(023)
(024)
(025)
<Property path=”id:ResourceType”>
<ValidValues>
<id:ResourceType>OperatingSystem</id:ResourceType>
<id:ResourceType>MicrosoftWindows_XP</id:ResourceType>
</ValidValues>
</Property>
<Property path=”os:processor/os:processorFamily”
<ValidValues>
<os:processorFamily>Pentium Family</os:processorFamily>
<os:processorFamily>AMD</os:processorFamily>
</ValidValues>
</Property>
13
Logical Model
<<globalElement>>
ResourePropertyDocument
wsdl:Operation
1..*
<<globalElement>>
xsd:element
0..1
1
<<extends/describes>>
<<constraints/describes>>
1..*
xsd:type
+extends
0..*
<<constrains/describes>>
wsdl:PortType
*
wsrmd:Property
wsrmd:Operation
<<constrains/describes>>
0..*
0..*
wsrmd:MetadataDescriptor
14
Information Model
15
Key design decisions
• Provides templates to describe
instantiated resources implementations
of those interfaces
• All instances of a resource conform to
the same descriptor document
• Exactly one ‘Descriptor’ document
associated with a WSDL interface or
portType
• Descriptor ‘points to’ the WSDL
document with which it is associated
• Allows additional domain specific
16
Pseudo Schemas
Definitions
<Definitions
targetNamespace=”xs:anyURI”
{anyAttribute}* >
<documentation />?
<MetadataDescriptor /> *
{any}*
</Definitions>
18
MetadataDescriptor
<MetadataDescriptor
name=”xs:NCName”
interface=”xs:QName”
specializes=”list of xs:QName”?
wsdlLocation=”list of xs:anyUri”?
metadataDescriptorLocation=”list of xs:anyUri”?
{anyAttribute}* >
<documentation /> ?
<Property /> *
<Operation /> *
{any}*
</MetadataDescriptor>
19
Property
<Property
path=”xs:QName [/ [xs:QName | xs:NCName ]]*
[/@[xs:QName | xs:NCName ]]?”
mutability=”[constant|appendable|mutable]” ?
modifiability=”[read-only|read-write]” ?
subscribability=”xs:boolean” ?
{anyAttribute}* >
<documentation />?
[ <ValidValues> {any}* </ValidValues> |
<ValidValueRange
lowerBound="xs:anySimpleType"?
upperBound="xs:anySimpleType"? /> ] ?
<StaticValues> {any}* </StaticValues> ?
{any}*
</Property>
20
Path of a Property component
(Overlaps)
• Overlapping path
iff, A1 = B1. This is equivalent to
saying that Property A and Property B
pertain to the same Resource
Property, but either or both of those
components may pertain only to a
descendant of the resource property.
For example, if the {path} of Property
A is “tns:a/b” and the {path} of
Property B is “tns:a”, we say that the
{path} of Property A and the {path}
of Property B overlap.
21
Path of a Property component
(identical)
• identical path
iff, for each value of i, Ai = Bi.
This is equivalent to saying the
{path} of Property A is
equivalent to the {path} of
Property B.
22
Path of a Property component
(narrower)
• “narrower” path
iff the path length of Property B is less than the Path
length of Property A, and for each value of i, where i
is less than the path length of B, Ai = Bi. This is
equivalent to saying that Property A is scoped to a
more specific sub part of the resource property. For
example, if the {path} of Property A is “tns:a/b” and
the {path} of Property B is “tns:a”, we say that
Property A has narrower scope, it describes or
constrains only the descendant nodes of the resource
property “tns:a” rooted at the element “b”. Property
B has a “broader” (or less narrow) path, in that it
pertains to the entire resource property “tns:a”.
23
Operation
<Operation
name=”xs:NCName”
inputMessage=“xs:QName” ?
outputMessage=”xs:QName” ?
idempotent=”xs:Boolean” ?
{anyAttribute}* >
<documentation>?
{any}
</Operation>
24