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

Hi Savas,

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

The above doens't work because WSDL doesn't allow one to 
introduce new operations to the interface via soap:operation.
If we want to make this approach work then we'd have to
define something like soap:attribute to define how to bind
attributes. That is certainly viable, but suffers from 
being 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.

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

I disagree. If we do it this way, someone can bind this to any
protocol/transport without any problem. It can be a regular SOAP
operation or an HTTP GET or whatever. Providing that flexibility
is precisely the role of wsdl:interface & wsdl:operation.

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

That's correct.

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

They're not at all; I think your mapping to WSDL shows that we
are basically in agreement except that you prefer something I 
disagree with.

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

Yes WSIF will have a problem because WSIF works primarily via
the interface. The bindings are only taken into consideration
by the WSIF code and not by the client programmer.

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

Nope, you have every right to have your views and defend it. As
long as you don't get to a certain Restafarian status you're in
good shape ;-).

Sanjiva.

Received on Tuesday, 1 July 2003 21:25:31 UTC