sca-assembly message
[Date Prev]
| [Thread Prev]
| [Thread Next]
| [Date Next]
--
[Date Index]
| [Thread Index]
| [List Home]
Subject: Interface compatibility with type inheritences
- From: Raymond Feng <rfeng@us.ibm.com>
- To: sca-assembly@lists.oasis-open.org
- Date: Fri, 19 Feb 2010 13:18:23 -0700
Hi,
The spec currently has this statement
for the operation compatibility:
2512 3.
compatibility for individual operations of the interfaces A and B is defined
as
2513 compatibility
of the signature, i.e., the operation name, the input types, and the
2514 output
types are the same
Many programming languages support inheritance,
for example, Java and XML. Requiring the input types and output types to
be the same seems to be too restrictive. For example, say Apple is a sub
type of Fruit, then we could have two operations as follows:
1) Fruit[] findSameColor(Apple apple)
; // Find all fruits that has the same color as the given apple
2) Apple[] findSameColor(Fruit fruit);
// Return all apples that has the same color as the given fruit
Any requests made via operation 1 can
be handled by a service that supports 2 and any response (including fault/exception)
produced by operation 2 can be handled by the caller of operation 1.
Can we just a reference typed by 1 and
wire it to a service implementing 2?
Thanks,
Raymond
Raymond Feng
Senior Software Engineer, Apache Tuscany PMC Member & Committer
IBM Bay Area Lab, 1001 E Hillsdale Blvd, Suite 400,
Foster City, CA 94404, USA
E-mail: rfeng@us.ibm.com,
Notes: Raymond Feng/Burlingame/IBM, Tel: 650-645-8117,
T/L: 367-8117
Personal Web Site: www.enjoyjava.com
Apache Tuscany: http://tuscany.apache.org
Co-author of Tuscany In Action: http://www.manning.com/laws
S/MIME Cryptographic Signature
[Date Prev]
| [Thread Prev]
| [Thread Next]
| [Date Next]
--
[Date Index]
| [Thread Index]
| [List Home]