W3C home > Mailing lists > Public > www-ws-desc@w3.org > July 2002

Re: Hoisting SOAP Binding Attributes

From: Roberto Chinnici <roberto.chinnici@sun.com>
Date: Thu, 18 Jul 2002 09:47:50 -0700
Message-ID: <3D36F136.A5239F7D@sun.com>
To: Jeffrey Schlimmer <jeffsch@windows.microsoft.com>
CC: www-ws-desc@w3.org

Jeffrey,

I like the idea of being able to specify defaults for these common attributes.

My main remak is that allowing these attributes to be specified on every
element under <soap:binding/> seems to be overkill.

Since it's hard for people to track the current value of an attribute that may
change as they move from a parent element to a child as well as from an
element to a sibling, I suspect that most people would end up using this
facility only for coarse-grained defaulting of values.

As a proof of this, look at how namespace declarations are used in XML
and especially at how hard it can be to follow the prefix-to-namespace
associations when the same prefix is bound to different namespaces at
various points in a document.

So my proposal is to follow roughly the approach used by XML Schema
and define attributes called
    styleDefault
    useDefault
    encodingStyleDefault
    namespaceDefault
that would be allowed only on the <soap:binding/> attribute.

Then, e.g. a missing "use" attribute on any element under <soap:binding/>
would default to the value of the "useDefault" attribute on the <soap:binding/>
element only (if present).

This way the information that someone reading WSDL would need to
keep in mind when examining a <soap:binding/> would simply be the value
of the four default attributes and those wouldn't change with the level of
nesting under <soap:binding/>.

In the examples you used, the two proposals would be entirely equivalent.
Here's what the bindings would look like with the xyzDefault attributes:

<binding name="StockQuoteSoapBinding"
    type="tns:StockQuotePortType">
  <soap:binding transport="http://schemas.xmlsoap.org/soap/http"
      styleDefault="rpc"
      useDefault="encoded"
      encodingStyleDefault="http://schemas.xmlsoap.org/soap/encoding/"
      namespaceDefault="http://example.com/stockquote" />
</binding>

<binding name="StockQuoteSoapBinding"
    type="tns:StockQuotePortType">
  <soap:binding transport="http://schemas.xmlsoap.org/soap/http"
    styleDefault="document"
    useDefault="literal" />
</binding>

My proposal would not allow you to write a binding such as this one:

<binding name="StockQuoteSoapBinding"
    type="tns:StockQuotePortType">
  <soap:binding transport="http://schemas.xmlsoap.org/soap/http"
      namespace="http://example.com/stockquote"
      style="rpc" />
    <operation name="GetTradePrice" use="literal"
          encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
      <input use="encoded">
        <soap:body
            namespace="http://example.com/foobar"/>
        <soap:header
            message="tns:TraderInfo"
            part="id"/>
      </input>
      <output>
        <soap:body use="encoded"
            namespace="http://example.com/stockquote"
            encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
      </output>
    </operation>
    ...
</binding>

Is the "TraderInfo" header literal or encoded, and what's its namespace?  ;-)

Roberto


Jeffrey Schlimmer wrote:

> In the case where operations are all bound in the same way, the existing
> SOAP binding is repetitious. A straightforward way to simplify this for
> the common case is to allow the SOAP binding attribute information items
> (AII) to be placed as defaults on the soap:binding element information
> item (EII) define that AII placed on children of soap:binding would
> override the default, and allow the soap:operation EII to be omitted if
> they do not override any defaults.
>
> This is not a proposal to eliminate the ability to define an
> operation-by-operation binding; it is only a proposal to simplify the
> default case where all operations within a portType are bound the same
> way.
>
> The table below summarizes where WSDL 1.1 defines the SOAP binding AII.
>
> EII \ AII         @style @use  @encodingStyle @namespace
> --------------------------------------------------------
> soap:binding      OK
> soap:operation    OK[*]
> soap:body                OK    OK             OK
> soap:header              OK    OK             OK
> soap:fault               OK    OK             OK
> soap:headerFault         OK    OK             OK
>
> Where [*] overrides value from parent.
>
> The proposal is to change the definition of the SOAP binding AII as
> shown in the table below.
>
> EII \ AII         @style @use  @encodingStyle @namespace
> --------------------------------------------------------
> soap:binding      OK     OK    OK             OK
> soap:operation    OK[*]
> soap:body                OK[*] OK[*]          OK[*]
> soap:header              OK[*] OK[*]          OK[*]
> soap:fault               OK[*] OK[*]          OK[*]
> soap:headerFault         OK[*] OK[*]          OK[*]
>
> EXAMPLE
>
> In the default case, where all the operations are bound the same way,
> this should simplify the binding significantly. For example, in WSDL
> 1.1, a SOAP rpc/encoded example in WSDL 1.1 would look like:
>
> <binding name="StockQuoteSoapBinding"
>     type="tns:StockQuotePortType">
>   <soap:binding transport="http://schemas.xmlsoap.org/soap/http"
>       style="rpc" />
>     <operation name="GetTradePrice">
>       <input>
>         <soap:body use="encoded"
>             namespace="http://example.com/stockquote"
>             encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
>       </input>
>       <output>
>         <soap:body use="encoded"
>             namespace="http://example.com/stockquote"
>             encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
>       </output>
>     </operation>
>     ...
> </binding>
>
> Where ... has to be repeated for each operation in the portType.
>
> By contrast, the same example given the proposal would look like:
>
> <binding name="StockQuoteSoapBinding"
>     type="tns:StockQuotePortType">
>   <soap:binding transport="http://schemas.xmlsoap.org/soap/http"
>       style="rpc"
>       use="encoded"
>       encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
>       namespace="http://example.com/stockquote" />
> </binding>
>
> A SOAP document/literal example given the proposal would look like:
>
> <binding name="StockQuoteSoapBinding"
>     type="tns:StockQuotePortType">
>   <soap:binding transport="http://schemas.xmlsoap.org/soap/http"
>     style="document"
>     use="literal" />
> </binding>
>
> EOF
Received on Thursday, 18 July 2002 12:53:51 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 7 December 2009 10:58:21 GMT