W3C home > Mailing lists > Public > www-ws-desc@w3.org > April 2004

SOAP 1.2 WebMethod support

From: David Orchard <dorchard@bea.com>
Date: Wed, 21 Apr 2004 13:19:25 -0700
Message-ID: <32D5845A745BFB429CBDBADA57CD41AF06E20063@ussjex01.amer.bea.com>
To: <www-ws-desc@w3.org>

WSDL 2.0 supports WebMethod by allowing web methods on interface operations, using this in bindings, and re-using the HTTP method attribute

1. WSDL interface operations contain optional webMethod attribute.   This is the HTTP operation name.  This may be used in bindings.
2. WSDL bindings contain an attribute called "useOperationWebMethod".  If true indicates that the binding should use the interface operation web method attribute.
3. HTTP Binding Operations contain an optional location attribute.  If set, this is the default URI for any operation bindings done in the http binding operation.  This attribute is in issue 64 proposed resolution.
4. HTTP Binding Operations contain an optional interface attribute.  This indicates that the referenced interface is used in it's entirety.  Each operation in the interface is bound to HTTP according to the webmethod name in the referenced interface.  The binding is that the content of the webmethod is mapped to the HTTP Method.  Note, this allows 3rd parties to define HTTP names, ie PROPGET, and the binding operations interface attribute should bind to HTTP in the desired way.  This is very similar to the interface attribute in issue 64 proposed resolution.

This is a follow-on to Hugo's work at [1].  There needs to be more work done to rationalize with the soap 1.2 binding and how to express in a simple binding the HTTP inputs and the SOAP+HTTP outputs such as headers and faults.  
    
Sample third party definitions - custom + web method names and custom binding to HTTP.
=================

   <wsdl:definitions 
      xmlns:myns="http://example.org/mystuff"
      xmlns:wsdl="http://www.w3.org/2004/03/wsdl" 

     <!-- Uses the webMethod attribute -->
     <wsdl:interface name="StockQuotes">
         <wsdl:operation name="getStockQuote" wsdl:webMethod="GET">
             <wsdl:input element="schema1"/>
             <wsdl:output element="schema2"/>
         </wsdl:operation>
         <wsdl:operation name="getStockQuoteGoldPayingCustomer" wsdl:webMethod="GET">
             <wsdl:input element="schema1"/>
             <wsdl:output element="schema2"/>
         </wsdl:operation>
         <wsdl:operation name="putStockQuote" wsdl:webMethod="PUT">
             <wsdl:input element="schema1"/>
             <wsdl:output element="schema2"/>
         </wsdl:operation>
     </wsdl:interface>

    <!-- The binding that uses a single URI and the WebMethod is quite simple -->
    <wsdl:binding name="myns:HTTPOneURIAndUseWebMethod">
	<!-- the binding provides a location for all the operations
      <http:binding interface="myns:StockQuotes" location="..." useOperationWebMethod="true"/>
    </wsdl:binding>

    <wsdl:binding name="myns:HTTPOneURIPerOperationAndUseOperationWebMethod">
      <http:binding useOperationWebMethod="true">
        <operation name="myns:getStockQuote">
          <http:operation location="..."/>
        </operation>
        <operation name="myns:getStockQuoteGoldPayingCustomer">
          <http:operation location="...(different loc)"/>
        </operation>
        <operation name="myns:putStockQuote">
          <http:operation location="...(yet another different loc)" />
        </operation>
        ...
      </http:binding>
    </wsdl:binding>

   <wsdl:binding name="myns:HTTPOneURI">
      <!-- Location for all the operations but the WebMethod isn't used -->
      <http:binding location="..."> 
        <operation name="myns:getStockQuote">
          <http:operation method="GET" />
        </operation>
        <operation name="myns:getStockQuoteGoldPayingCustomer">
          <http:operation method="GET" />
        </operation>
        <operation name="myns:putStockQuote">
          <http:operation method="PUT" />
        </operation>
        ...
      </http:binding>
    </wsdl:binding>

   </wsdl:definitions>

Cheers,
Dave

[1] http://lists.w3.org/Archives/Public/www-ws-desc/2004Apr/0031.html
Received on Wednesday, 21 April 2004 16:19:27 GMT

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