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

RE: Rationale to close the operation overloading issue

From: <ryman@ca.ibm.com>
Date: Fri, 21 Jun 2002 17:13:10 -0400
To: Jochen.Ruetschlin@DaimlerChrysler.com
Cc: www-ws-desc@w3.org, www-ws-desc-request@w3.org
Message-ID: <OF05463F7B.D559BAB4-ON85256BDF.00734870@torolab.ibm.com>

The approach works for methods with any number of arguments since you can
define corresponding XML Schema types. In your example,

getAddress(socialNo)
getAddress(name, surname)
getAddress(login)

I'd use the following type:

    <complexType name="getAddressType">
        <choice>
            <element name="socialNo" type="string"></element>
            <element name="nameSurname">
                <complexType>
                    <sequence>
                        <element name="name" type="string"></element>
                        <element name="surname" type="string"></element>
                    </sequence>
                </complexType>
            </element>
            <element name="login" type="string">
            </element>
        </choice>
    </complexType>

There are many other equivalent ways to represent the method signatures as
XML Schema.

Arthur Ryman


                                                                                                                                            
                    Jochen.Ruetschlin@DaimlerCh                                                                                             
                    rysler.com                        To:     Arthur Ryman/Toronto/IBM@IBMCA                                                
                    Sent by:                          cc:     <www-ws-desc@w3.org>                                                          
                    www-ws-desc-request@w3.org        Subject:     RE: Rationale to close the operation overloading issue                   
                                                                                                                                            
                                                                                                                                            
                    06/21/2002 03:59 AM                                                                                                     
                    Please respond to                                                                                                       
                    Jochen.Ruetschlin                                                                                                       
                                                                                                                                            
                                                                                                                                            




> These could be mapped to a single Web service operation named print that
> had an input message that allowed either int or float, e.g.
>
>     <complexType name="printType">
>         <choice>
>             <element name="int" type="int"/>
>             <element name="float" type="float"/>
>         </choice>
>     </complexType>

But this works only, if you have the same number of parameters.

jr.

Jochen Rütschlin
DaimlerChrysler · Research and Technology
Data and Process Management (RIC/ED)
P.O. Box 2360 · D-89013 Ulm (Donau) · Germany
Visitor's address: Wilhelm-Runge-Straße 11
Phone:   +49.731.505-2830
Telefax: +49.731.505-4401
Internet E-Mail: jochen.ruetschlin@DaimlerChrysler.com
Received on Friday, 21 June 2002 17:13:15 GMT

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