Hi, Mike.

I like your proposal to define the interface compatibility. The current 1.0 spec is vague in this area.

One thing to clarify: are you proposing to use WSDL as the canonical IDL? WSDL 1.1 or 2.0?

Thanks,
Raymond

----- Original Message ----- From: "Mike Edwards" <[EMAIL PROTECTED]>
To: <tuscany-dev@ws.apache.org>
Sent: Monday, July 09, 2007 2:52 AM
Subject: Re: Need spec defined Databindings? Was: (TUSCANY-824) DataBinding: Is it a concern of Programming Model vs. Assembly?


Scott,

I think you ask a fair question here, which is definitely a question for the Assembly spec working group to consider and answer.

Making it as succinct as I can, I think the issue is this:

For the interfaces at each end of a wire, when they are specified using the same interface definition language, do they have to be identical, or is it sufficient that they both map to the same WSDL?

It is clear in the case where the interface definition languages are different, that the rule is to map to WSDL and then compare the WSDLs. This is not stated for the case where the two ends of the wire use the same interface definition language.

I can also see two cases to consider:

a) Where the interface is local
b) Where the interface is remotable

I believe that for local interfaces, only by using the same interface definition language is it possible to have a local interface. In this case, the rules are going to REQUIRE that the interfaces are identical. Local in principle implies handing over of "native" data objects between client and provider - ie Java objects in the case of Java interface definitions. This can't be done if the object types don't match exactly.

For remotable interfaces, they MUST be mappable to WSDL. So in the case of wires connecting remotable interfaces, the rule is to map both ends to WSDL and then do the comparison. Hence I think that in this case, the Java form of the two interfaces does not have to match at all - as long as the databinding takes care of mapping the Java interfaces to the same WSDL, then we are good to go.

This is my interpretation - let's see what the other spec team people think about it....


Yours,  Mike.

Scott Kurz wrote:
Mike,

I'd been steering the discussion towards how to avoid annotations since I
haven't been interested in the mixed cases (since I'm not sure who would
want to do that) and the last points we've been discussing relate to how to
do the Tuscany-specific introspection and DB setup properly.

So I personally don't see a need to input to the spec.

------------------------------------------------------------------------------


I'd like to use this opportunity to ask about a different point (but related
to the subject heading of the JIRA).
(This is long because I fleshed out some examples)

I would be interested to hear your and others' opinions on the question:
how does the choice of intf at Assembly impact the PM?
(I think this question was touched on in the original exchange btw. Raymond
and Jim Marino but I'm not sure how it was resolved.)

To illustrate, suppose I have a WSDL which defines operation 'm1'

In MyIntf.wsdl:

<wsdl:definitions targetNamespace="http://pkg.my/v1";
 xmlns:tns="http://pkg.my/v1"; ...>
...
<!-- Defined in 'somens' -->
<xs:complexType name="MyType">
...
<!-- wrapper elem for operation 'm1' -->
<xs:element name="m1">
<xs:complexType>
 <xs:sequence>
   <xs:element name="param" type="somens:MyType"/>
 </xs:sequence>
</xs:complexType>
</xs:element>
....
<wsdl:portType name="MyIntf">
 <wsdl:operation name="m1">
  ...


I'm planning to use this MyIntf portType on an <interface.wsdl> to type an
SCA service intf

But first, say I have a Java impl of this service intf:

MyImpl.java
  @Service(some.pkg.MyIntf.class)
  class MyImpl implements some.pkg.MyIntf {
      void m1(my.pkg1.MyType) {
        // .. impl ..
      }
  }

Suppose some.pkg.MyIntf is generated from WSDL per-JAXWS. Suppose that the
Java type
my.pkg1.MyType is mappable to the somens:MyType schema type.

Having set this up, I don't think there's any question that the the
some.pkg.MyIntf is wire-compatible
with WSDL interface:  tns:MyIntf

Now, the question of whether this will work in Tuscany or not will depend on
more info introspected
from the impl.  For example if the impl uses a generated SDO of type
my.pkg1.MyType or a JAXB type
annotated to match somens:MyType, then this will be able to make it through
the Tuscany DB framework.
If my.pkg1.MyType matches a POJO or some other type, then whether it will
work depends on whether we
can construct the appropriate transformer chain or not.

If the component-service is configured in SCDL with:
 <interface.wsdl interface="http://pkg.my/v1#wsdl.interface(MyIntf)"/>

then there's no question the Java impl's Java service intf is compatible
with this WSDL intf.  (My Java
interface's package doesn't matter since the SCA assembly spec clearly says
that mappability can be satisfied
in the interfaces have the same operations with the same types.


Now.. one way to phrase the core of the question I've been building up to
would be:  are interfaces compatible merely by having "mappable" types
or do they have to be "the same"?

Sec. 1.6.4 of the Assembly spec seems to say both in a short span.

So, some examples:

With the same MyImpl.java annotated above with service intf:
  @Service(some.pkg.MyIntf.class)

would the following Java interfaces be considered mappable if they were
placed on the component-level service in SCDL
via the corresponding <interface.java> element?


MyIntfSDO.java
  void m1(DataObject)

MyIntf.java
  void m1(my.pkg2.MyType)      // MyType is identical but in a different
package

MyIntf.java
  void m1(my.pkg2.MyTypeImpl)  // where MyTypeImpl is a generated SDO
implementing MyType


Hopefully it's clear how these examples relate to my question: how does the
choice of intf at assembly impact the PM?

Thanks,
Scott

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to