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

"Savas Parastatidis" <Savas.Parastatidis@newcastle.ac.uk> writes:
> You're right! My mistake. I don't see the problem with defining
> soap:attribute, though. Operations are binding specific already. Why not
> attributes? 

Operations are not binding specific.

> > > 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>
> > 
> > That's precisely what I meant.
> > 
> 
> I see this as very restrictive. All you are doing is effectively
> defining in the WSDL specification a transformation from WSDL to WSDL.
> You are not making attributes a first-class WSDL element.

Its as first-class as attributes are in OMG IDL. I believe that will
satisfy the needs of Grid and others who are interested in attributes.

> Then, if you are going to treat attributes as operations, perhaps you
> shouldn't define attributes in WSDL. You should have a separate document
> describing a convention on what it means for an interface to support
> attributes.

This is the JavaBeans approach. When JavaBeans were being done there
was resistence to changing the language and so it was layered on. A
few years later, C# went ahead and made them part of the language. I
believe the C# model is better as there is no confusion about what's
a component and what's just a class. If you are familiar with Apache
SOAP or Apache Axis you'll know the endless user confusion about
why certain classes are not beans .. most people don't really 
understand the difference.

Here we are faced with the same choice. My answer is that we should
do what C# has done and make them part of the language.

> What you are suggesting is similar to saying in IDL that the
> "attribute" IDL keyword suggests that every IDL-defined interface should
> have get/set methods. However, that is not the case.

The semantic is that it is *as if*\ it has those methods. That means
that a request to get the value of that attribute would be by
invoking a get method etc.. As Jeff explained that's the OMG IDL
model and I believe that's what we should do too.

Sanjiva.

Received on Wednesday, 2 July 2003 21:51:27 UTC