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

> 
> The summary I wrote down did have a way for the clients to get the
> values: I said the semantics are as per OMG IDL- which means
> that there must be a getFoo() for every attribute Foo etc.. Language
> bindings such as JAXRPC can select how to expose that to the user,
> but the semantic must be via a method just like in IDL.
> 
> Without that I agree that its a vacuous specification. Savas, do
> you not agree?
> 

Since Umit agreed, I feel that I have to disagree :-)

In the Web services world, it really does not matter how programming
languages expose operations, attributes, etc. It is the messaging
framework that needs to be agreed upon. So, I don't agree with the above
paragraph. As a C# programmer, for example, I really don't care how
JAXRPC exposes attributes to the programmer (and the other way around).
Everyone should agree on the attributes-related messages that are
exchanged.

I think there is a slightly wrong statement in Sanjiva's explanation
above. As per Jeff's earlier message, IDL specifies that appropriate
operations need to be defined by a _language_mapping_. In C#, these may
be mapped to C# properties and not getFoo/setFoo methods, although there
could be a language mapping that specified that this should be the case.

<quote from Jeff's message>
<quote from IDL specification>
"An interface can have attributes as well as operations; as such,
attributes are defined as part of an interface. An attribute definition
is logically equivalent to declaring a pair of accessor functions; one
to retrieve the value of the attribute and one to set the value of the
attribute."
</quote from IDL specification>

And later:

<quote from IDL specification>
"The actual accessor function names are language-mapping specific. The
attribute name is subject to OMG IDL's name scoping rules; the accessor
function names are guaranteed not to collide with any legal operation
names specifiable in OMG IDL."
</quote from IDL specification>
<quote from Jeff's message>

Nowhere it is suggested that those operations must be of the form
getFoo() or setFoo(blabla). That's the job of the "IDL to Java mapping"
specification [1].


I believe that in the Web services world, interoperability would be
guaranteed through the definition of the appropriate bindings for
attributes.

Here's what I mean (an approximation of WSDL 1.2)...

<wsdl:interface name="myInterface">
   <wsdl:attribute name="foo" type="xsd:string"/>
   <wsdl:operation name="bar">
    ...
   </wsdl:operation>
</wsdl:interface>

<wsdl:binding name="myBinding" interface="myInterface">
   <soap:binding protocol="http://blabla/soap/bla"
styleDefault="document"/>
   <wsdl:attribute name="foo">
      <soap:operation style="document"
soapAction="http://example.com/myService/foo"/>
      </soap:operation>
    </wsdl:attribute>
    <wsdl:operation ...
    ...
    </wsdl:operation>
</wsdl:binding>

<wsdl:service name="myService" interface="myInterface">
   <wsdl:endpoint name="http://example.com/myService"
binding="myBinding"/>
</wsdl:service>


The attribute binding to SOAP could be defined as:

<definitions>
  <binding>
    <attribute>
       <soap:operation style="document|rpc"?
                       soapAction="uri"? /> ?
    </attribute>
  </binding>
</definitions>


(Note: The above are just examples to illustrate my point and not a
well-thought proposal).


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>

then I would argue that these two are indeed very similar but such a
transformation is more restrictive than it is necessary. I believe the
previous binding approach is closer to what WSDL should define.

All the above have nothing to do with Java or any other language but
still can allow interoperability.

Phew!

> The operation cannot be per binding. Otherwise no kind of binding
> independent DII (ala WSIF) is possible to deal with attributes.

Why do you think that <attribute> elements should be treated as
different from <operation> elements? Look at my binding example above. I
think that since soap:operation is used, WSIF will have no problem
dealing with that. No? (I have not studied WSIF in detail).

Regards,
.savas.

PS: I hope people don't get tired with my objections. Perhaps I should
start keeping my "voice" down since it seems that I am the only one with
these views :-(


[1]. IDL to Java mapping (page 1-28):
http://www.omg.org/cgi-bin/doc?formal/02-08-05
 

Received on Tuesday, 1 July 2003 18:16:44 UTC