W3C home > Mailing lists > Public > public-ws-desc-state@w3.org > July 2003

Re: attributes & WSDL (was: Re: attributes in CORBA IDL)

From: David Snelling <d.snelling@fle.fujitsu.com>
Date: Thu, 03 Jul 2003 10:48:44 +0100
To: Sanjiva Weerawarana <sanjiva@watson.ibm.com>, <public-ws-desc-state@w3.org>
Message-ID: <BB29BA8C.1661%d.snelling@fle.fujitsu.com>
Folks,

Given the following proposal independent of whether it is a good idea or not
from the WSDL language vs library debate, here are a few comments from the
OGSI perspective. I realize that this is not a proposal as such, but it
helps illustrate some of our requirements.

> Now, if you mean that the WSDL specification should define that this
> 
> <wsdl:interface name="myInterface">
>    <wsdl:attribute name="foo" type="xsd:string" readonly="true"/>
> </wsdl:interface>
> 
> is translated to this
> 
> <wsdl:message name="fooMessage" >
>    <part name="value" type="xsd:string"/>
> </wsdl:message>
> 
> <wsdl:interface name="myInterface">
>   <wsdl:operation name="getFoo">
>      <wsdl:output message="fooMessage"/>
>   </wsdl:operation>
> </wsdl:interface>

1) Attribute definition

The declaration is exactly what we have had in mind. In fact,

   1,$/sd:serviceData/wsdl:attribute/g

should do the trick.

2) Declaration of static values in the WSDL.

I don't see a problem here as long as something like this is possible
(converted to OGSI terminology).

 <wsdl:interface name="myInterface">
    <wsdl:attribute name="foo"         type="xsd:string"
                    modifiable="false" mutability="static">
       "Imagination is the only weapon in the war against reality.
                               - Jules de Gautier "
    </wsdl:attribute>
 </wsdl:interface>


3) Multiple instances of an attribute.

Although not a show stopper because we can always add a layer of structure
to an attribute to allow multiple attributes with a given name, our first
pass was more like elements. Min/maxOccurs provides the structure necessary
for multiple instance of attributes. The problem here might be with the
accessor functions. For an attribute with maxOccurs="unbounded", would this
work?

 <wsdl:message name="fooMessage" >
    <part name="value" type="xsd:string" maxOccurs="unbounded"/>
 </wsdl:message>

If yes, there is no problem.

4) Dynamic attributes

You will recall that the OGSI model allows serviceData values to be added to
a service's state dynamically. I believe that the translation to
getter/setter makes this a bit complicated. The "is translated to this" bit
in the proposal would need to be done on the fly at invocation time. My
guess is that this is possible, if requiring a bit of cleverness in the
tooling.

5) Many attributes

Following on from (4), with 100s or more attributes, dynamic translation
seem almost a requirement anyway.

6) Getting multiple attributes at once

One requirement not addressed is the ability to get more than one attribute
in a single invocation.

The Grid Service approach might be something like (pardon my wsdl):

The existence of any attribute causes the following to be added implicitly
to the wsdl.

 <wsdl:message name="getAttributes" >
    <part name="attributeNames" type="xsd:string" maxOccurs="unbounded"/>
 </wsdl:message>
 
 <wsdl:message name="getAttributesResult" >
    <part name="attributeValues" type="xsd:any" maxOccurs="unbounded"/>
 </wsdl:message>
 
 <complexType name="setAtributesType">
    <sequence>
       <element name="name" type="xsd:string" minOccurs="1" maxOccurs="1"/>
       <element name="value" type="xsd:any" minOccurs="1" maxOccurs="1"/>
    </sequence>
 </complexType>

 <wsdl:message name="setAttributes" >
    <part name="nameValuePairs" type="setAtributesType"
                         maxOccurs="unbounded"/>
 </wsdl:message>
 
 <wsdl:interface name="myInterface">

   <wsdl:operation name="getAttributes">
      <wsdl:input message="getAttributes"/>
      <wsdl:output message="getAttributesResult"/>
   </wsdl:operation>

   <wsdl:operation name="setAttributes">
      <wsdl:input message="setAttributes"/>
   </wsdl:operation>

 </wsdl:interface>

This addresses most of out needs. The complex query processing across
multiple attributes could be done at the GridService level (e.g. in our
interface specification). I have left out deletion of attributes, but
setting them to nil might work. We would need to rework the distinction we
make between nil and not there, but this was an area of some debate anyway.

Comments, particularly from Steve?

-- 

Take care:

    Dr. David Snelling <d.snelling@fle.fujitsu.com>
    Fujitsu Laboratories of Europe
    Hayes Park Central
    Hayes End Road
    Hayes, Middlesex  UB4 8FE

    +44-208-606-4649 (Office)
    +44-208-606-4539 (Fax)
    +44-7768-807526  (Mobile)



Received on Thursday, 3 July 2003 05:48:42 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 19:32:54 UTC