You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tuscany.apache.org by "ant elder (JIRA)" <tu...@ws.apache.org> on 2006/10/11 15:30:07 UTC

[jira] Created: (TUSCANY-824) DataBinding: Is it a concern of Programming Model vs. Assembly?

DataBinding: Is it a concern of Programming Model vs. Assembly?
---------------------------------------------------------------

                 Key: TUSCANY-824
                 URL: http://issues.apache.org/jira/browse/TUSCANY-824
             Project: Tuscany
          Issue Type: Bug
          Components: Java SCA Core
    Affects Versions: Java-M2
            Reporter: ant elder
            Priority: Blocker
             Fix For: Java-M2


There have been some question about the DataBinding framework and if it should be a concern of the Programming Model vs. Assembly?

See: http://www.mail-archive.com/tuscany-dev@ws.apache.org/msg08679.html

and a follow up mention in: http://www.mail-archive.com/tuscany-dev@ws.apache.org/msg09363.html

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org


Re: [jira] Created: (TUSCANY-824) DataBinding: Is it a concern of Programming Model vs. Assembly?

Posted by Jim Marino <jm...@myromatours.com>.
I don't think this is a blocker. If we need to annotate  
implementation classes in samples for the databinding framework to  
perform the transformation, we should just release note that this is  
a temporary thing and will be resolved in a later release.

Jim

On Oct 12, 2006, at 8:30 AM, Jeremy Boynes wrote:

> What do we need to do to clear this blocker?
> --
> Jeremy
>
> On Oct 11, 2006, at 6:30 AM, ant elder (JIRA) wrote:
>
>> DataBinding: Is it a concern of Programming Model vs. Assembly?
>> ---------------------------------------------------------------
>>
>>                  Key: TUSCANY-824
>>                  URL: http://issues.apache.org/jira/browse/ 
>> TUSCANY-824
>>              Project: Tuscany
>>           Issue Type: Bug
>>           Components: Java SCA Core
>>     Affects Versions: Java-M2
>>             Reporter: ant elder
>>             Priority: Blocker
>>              Fix For: Java-M2
>>
>>
>> There have been some question about the DataBinding framework and  
>> if it should be a concern of the Programming Model vs. Assembly?
>>
>> See: http://www.mail-archive.com/tuscany-dev@ws.apache.org/ 
>> msg08679.html
>>
>> and a follow up mention in: http://www.mail-archive.com/tuscany- 
>> dev@ws.apache.org/msg09363.html
>>
>> -- 
>> This message is automatically generated by JIRA.
>> -
>> If you think it was sent incorrectly contact one of the  
>> administrators: http://issues.apache.org/jira/secure/ 
>> Administrators.jspa
>> -
>> For more information on JIRA, see: http://www.atlassian.com/ 
>> software/jira
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
>> For additional commands, e-mail: tuscany-dev-help@ws.apache.org
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: tuscany-dev-help@ws.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org


Re: [jira] Created: (TUSCANY-824) DataBinding: Is it a concern of Programming Model vs. Assembly?

Posted by Jeremy Boynes <jb...@apache.org>.
What do we need to do to clear this blocker?
--
Jeremy

On Oct 11, 2006, at 6:30 AM, ant elder (JIRA) wrote:

> DataBinding: Is it a concern of Programming Model vs. Assembly?
> ---------------------------------------------------------------
>
>                  Key: TUSCANY-824
>                  URL: http://issues.apache.org/jira/browse/TUSCANY-824
>              Project: Tuscany
>           Issue Type: Bug
>           Components: Java SCA Core
>     Affects Versions: Java-M2
>             Reporter: ant elder
>             Priority: Blocker
>              Fix For: Java-M2
>
>
> There have been some question about the DataBinding framework and  
> if it should be a concern of the Programming Model vs. Assembly?
>
> See: http://www.mail-archive.com/tuscany-dev@ws.apache.org/ 
> msg08679.html
>
> and a follow up mention in: http://www.mail-archive.com/tuscany- 
> dev@ws.apache.org/msg09363.html
>
> -- 
> This message is automatically generated by JIRA.
> -
> If you think it was sent incorrectly contact one of the  
> administrators: http://issues.apache.org/jira/secure/ 
> Administrators.jspa
> -
> For more information on JIRA, see: http://www.atlassian.com/ 
> software/jira
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: tuscany-dev-help@ws.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org


[jira] Commented: (TUSCANY-824) DataBinding: Is it a concern of Programming Model vs. Assembly?

Posted by "Raymond Feng (JIRA)" <tu...@ws.apache.org>.
    [ https://issues.apache.org/jira/browse/TUSCANY-824?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12500173 ] 

Raymond Feng commented on TUSCANY-824:
--------------------------------------

There have been a lot of changes since this JIRA was opened. Basically, we have switched to a mode that the runtime will try to recognize the databindings by introspection without user annotations. There is one issue left and being discussed on the ML to figure out if we need the @DataBinding annotation to specify the interface/operation level databinding mapping.

Another issue is if interface.wsdl is used, usally a XML/java binding such as SDO or JAXB is used by the java implementation class. We need to find the corresponding databinding for the interface.wsdl in these cases.

I'll leave it open for now until we have a better view.

> DataBinding: Is it a concern of Programming Model vs. Assembly?
> ---------------------------------------------------------------
>
>                 Key: TUSCANY-824
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-824
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SCA Core Runtime
>    Affects Versions: Java-SCA-M2
>            Reporter: ant elder
>            Assignee: Raymond Feng
>            Priority: Critical
>             Fix For: Java-SCA-Next
>
>
> There have been some question about the DataBinding framework and if it should be a concern of the Programming Model vs. Assembly?
> See: http://www.mail-archive.com/tuscany-dev@ws.apache.org/msg08679.html
> and a follow up mention in: http://www.mail-archive.com/tuscany-dev@ws.apache.org/msg09363.html

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org


[jira] Resolved: (TUSCANY-824) DataBinding: Is it a concern of Programming Model vs. Assembly?

Posted by "Jean-Sebastien Delfino (JIRA)" <tu...@ws.apache.org>.
     [ https://issues.apache.org/jira/browse/TUSCANY-824?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jean-Sebastien Delfino resolved TUSCANY-824.
--------------------------------------------

    Resolution: Fixed

A fix equivalent to your patch has been applied.

I don't think that the last comment about operation level databinding applies to the scenarios that we've been supporting in Tuscany, but if you think that there is an issue in the Tuscany code base, could you please raise it (as you suggested in your comment) as a separate new issue.

Thanks.

> DataBinding: Is it a concern of Programming Model vs. Assembly?
> ---------------------------------------------------------------
>
>                 Key: TUSCANY-824
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-824
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SCA Core Runtime
>    Affects Versions: Java-SCA-M2
>            Reporter: ant elder
>            Assignee: Raymond Feng
>            Priority: Critical
>             Fix For: Java-SCA-Next
>
>         Attachments: skurz.824.v1.patch
>
>
> There have been some question about the DataBinding framework and if it should be a concern of the Programming Model vs. Assembly?
> See: http://www.mail-archive.com/tuscany-dev@ws.apache.org/msg08679.html
> and a follow up mention in: http://www.mail-archive.com/tuscany-dev@ws.apache.org/msg09363.html

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org


[jira] Commented: (TUSCANY-824) DataBinding: Is it a concern of Programming Model vs. Assembly?

Posted by "Scott Kurz (JIRA)" <tu...@ws.apache.org>.
    [ https://issues.apache.org/jira/browse/TUSCANY-824?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12501735 ] 

Scott Kurz commented on TUSCANY-824:
------------------------------------

This is a link to the ML discussion Raymond mentioned:

http://www.mail-archive.com/tuscany-dev@ws.apache.org/msg18236.html


> DataBinding: Is it a concern of Programming Model vs. Assembly?
> ---------------------------------------------------------------
>
>                 Key: TUSCANY-824
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-824
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SCA Core Runtime
>    Affects Versions: Java-SCA-M2
>            Reporter: ant elder
>            Assignee: Raymond Feng
>            Priority: Critical
>             Fix For: Java-SCA-Next
>
>
> There have been some question about the DataBinding framework and if it should be a concern of the Programming Model vs. Assembly?
> See: http://www.mail-archive.com/tuscany-dev@ws.apache.org/msg08679.html
> and a follow up mention in: http://www.mail-archive.com/tuscany-dev@ws.apache.org/msg09363.html

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org


[jira] Updated: (TUSCANY-824) DataBinding: Is it a concern of Programming Model vs. Assembly?

Posted by "Jim Marino (JIRA)" <tu...@ws.apache.org>.
     [ https://issues.apache.org/jira/browse/TUSCANY-824?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jim Marino updated TUSCANY-824:
-------------------------------

        Fix Version/s:     (was: Java-SCA-M3)
                       Java-SCA-2.0-Alpha
    Affects Version/s:     (was: Java-M2)
                       Java-SCA-2.0-Alpha

> DataBinding: Is it a concern of Programming Model vs. Assembly?
> ---------------------------------------------------------------
>
>                 Key: TUSCANY-824
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-824
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SCA Core
>    Affects Versions: Java-SCA-2.0-Alpha
>            Reporter: ant elder
>         Assigned To: Raymond Feng
>            Priority: Critical
>             Fix For: Java-SCA-2.0-Alpha
>
>
> There have been some question about the DataBinding framework and if it should be a concern of the Programming Model vs. Assembly?
> See: http://www.mail-archive.com/tuscany-dev@ws.apache.org/msg08679.html
> and a follow up mention in: http://www.mail-archive.com/tuscany-dev@ws.apache.org/msg09363.html

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org


[jira] Updated: (TUSCANY-824) DataBinding: Is it a concern of Programming Model vs. Assembly?

Posted by "Scott Kurz (JIRA)" <tu...@ws.apache.org>.
     [ https://issues.apache.org/jira/browse/TUSCANY-824?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Scott Kurz updated TUSCANY-824:
-------------------------------

    Attachment: skurz.824.v1.patch

This patch attempts to solve two databinding-related problems, though neither solution has necessarily been agreed upon by the community.

First, it sets up an operation DB (if one isn't set) by looking for non-default DBs set on the inputs/output/faults.    This is what we were specifically
discussing in the thread mentioned in the JIRA.

Second, I also addressed the question of how to calculate the databinding of a fault type.     

As this comment in DataTransformationInteceptor.getFaultType() mentions:

    private DataType getFaultType(DataType exceptionType) {
        // FIXME: We cannot assume the exception will have a databinding set

there might be no DB on the exception type.    The case I was trying to address was the case that the exception class was a POJO with no
special DB, but the exception class, in the pattern mentioned in the JAX-WS spec, wrappers a FaultBean accessible via getFaultInfo().

Since the various ExceptionHandler's already know how to "unwrapper" an exception to find the DataType of the FaultBean within, I added an option to
the DefaultDataBindingExtensionPoint to check for an ExceptionHandler for each of the DB's it goes through, and see if exceptionHandler.getFaultType(..) can return something.

Even if this seems worthy, I know it might be best handled separately... but this JIRA's a bit broad to begin with anyway.  

> DataBinding: Is it a concern of Programming Model vs. Assembly?
> ---------------------------------------------------------------
>
>                 Key: TUSCANY-824
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-824
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SCA Core Runtime
>    Affects Versions: Java-SCA-M2
>            Reporter: ant elder
>            Assignee: Raymond Feng
>            Priority: Critical
>             Fix For: Java-SCA-Next
>
>         Attachments: skurz.824.v1.patch
>
>
> There have been some question about the DataBinding framework and if it should be a concern of the Programming Model vs. Assembly?
> See: http://www.mail-archive.com/tuscany-dev@ws.apache.org/msg08679.html
> and a follow up mention in: http://www.mail-archive.com/tuscany-dev@ws.apache.org/msg09363.html

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org


[jira] Updated: (TUSCANY-824) DataBinding: Is it a concern of Programming Model vs. Assembly?

Posted by "ant elder (JIRA)" <tu...@ws.apache.org>.
     [ https://issues.apache.org/jira/browse/TUSCANY-824?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

ant elder updated TUSCANY-824:
------------------------------

    Priority: Critical  (was: Blocker)

Was only a blocker while we were holding M2 for this so lowering priority now

> DataBinding: Is it a concern of Programming Model vs. Assembly?
> ---------------------------------------------------------------
>
>                 Key: TUSCANY-824
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-824
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SCA Core
>    Affects Versions: Java-M2
>            Reporter: ant elder
>         Assigned To: Raymond Feng
>            Priority: Critical
>             Fix For: Java-M3
>
>
> There have been some question about the DataBinding framework and if it should be a concern of the Programming Model vs. Assembly?
> See: http://www.mail-archive.com/tuscany-dev@ws.apache.org/msg08679.html
> and a follow up mention in: http://www.mail-archive.com/tuscany-dev@ws.apache.org/msg09363.html

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org


Re: Need spec defined Databindings? Was: (TUSCANY-824) DataBinding: Is it a concern of Programming Model vs. Assembly?

Posted by Raymond Feng <en...@gmail.com>.
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" <mi...@gmail.com>
To: <tu...@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: tuscany-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: tuscany-dev-help@ws.apache.org
>
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org


Re: Need spec defined Databindings? Was: (TUSCANY-824) DataBinding: Is it a concern of Programming Model vs. Assembly?

Posted by Mike Edwards <mi...@gmail.com>.
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: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org


Re: Need spec defined Databindings? Was: (TUSCANY-824) DataBinding: Is it a concern of Programming Model vs. Assembly?

Posted by Scott Kurz <sc...@gmail.com>.
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

On 7/6/07, Mike Edwards <mi...@gmail.com> wrote:
>
> Folks,
>
> OK, finally, I bite  ;-)
>
> The question for me is whether we need the SCA (Java) spec to define
> some standard metadata (typically annotations) for databindings of
> services & references.
>
> I make the assumption that for much of the time, it is possible to work
> out the required databinding simply by inspection of the types of the
> parameters involved.  If you find an SDO object, if you find a JAXB
> object, etc.
>
> So is the real issue the case where mixed types of data objects turn up?
>   Or are there ambiguous cases where you can't tell what the kind of
> object is?
>
> I suppose that we can take two views of cases like these:
>
> a) Don't go there, it's not valid.
>
> b) OK, annotate your code enough to tell us exactly what you expect to
> happen.
>
> If we want to go down the second path, then I'm happy to carry back
> requirements to the SCA Java WG, but I'd really like an appreciation of
> just how common this case is likely to be.
>
> Views please....
>
>
> Yours,  Mike.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: tuscany-dev-help@ws.apache.org
>
>

Re: Need spec defined Databindings? Was: (TUSCANY-824) DataBinding: Is it a concern of Programming Model vs. Assembly?

Posted by Huang Kai <pr...@gmail.com>.
+1.
:-) 
----- Original Message ----- 
From: "Mike Edwards" <mi...@gmail.com>
To: <tu...@ws.apache.org>
Sent: Friday, July 06, 2007 9:34 PM
Subject: Need spec defined Databindings? Was: (TUSCANY-824) DataBinding: Is it a concern of Programming Model vs. Assembly?


> Folks,
> 
> OK, finally, I bite  ;-)
> 
> The question for me is whether we need the SCA (Java) spec to define 
> some standard metadata (typically annotations) for databindings of 
> services & references.
> 
> I make the assumption that for much of the time, it is possible to work 
> out the required databinding simply by inspection of the types of the 
> parameters involved.  If you find an SDO object, if you find a JAXB 
> object, etc.
> 
> So is the real issue the case where mixed types of data objects turn up? 
>  Or are there ambiguous cases where you can't tell what the kind of 
> object is?
> 
> I suppose that we can take two views of cases like these:
> 
> a) Don't go there, it's not valid.
> 
> b) OK, annotate your code enough to tell us exactly what you expect to 
> happen.
> 
> If we want to go down the second path, then I'm happy to carry back 
> requirements to the SCA Java WG, but I'd really like an appreciation of 
> just how common this case is likely to be.
> 
> Views please....
> 
> 
> Yours,  Mike.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: tuscany-dev-help@ws.apache.org
>

Re: Need spec defined Databindings? Was: (TUSCANY-824) DataBinding: Is it a concern of Programming Model vs. Assembly?

Posted by Raymond Feng <en...@gmail.com>.
Hi, Mike.

Thank you for looking into it. Please see my comments inline.

Raymond

----- Original Message ----- 
From: "Mike Edwards" <mi...@gmail.com>
To: <tu...@ws.apache.org>
Sent: Friday, July 06, 2007 6:34 AM
Subject: Need spec defined Databindings? Was: (TUSCANY-824) DataBinding: Is 
it a concern of Programming Model vs. Assembly?


> Folks,
>
> OK, finally, I bite  ;-)
>
> The question for me is whether we need the SCA (Java) spec to define some 
> standard metadata (typically annotations) for databindings of services & 
> references.
>
> I make the assumption that for much of the time, it is possible to work 
> out the required databinding simply by inspection of the types of the 
> parameters involved.  If you find an SDO object, if you find a JAXB 
> object, etc.

We have been trying hard to inspect the data types in order to avoid 
tuscany-specific annotations. The inspections are based on different things, 
for example, the DataObject interface for dynamic SDO, code pattern for 
generated SDO (or we have to register generated SDO types first and do a 
lookup using the java class as the key) and annotations for JAXB.

The inspection can figure out what data type is used in most cases, for 
example, a SDO data object, a JAXB bean or a DOM node. Sometimes we need 
additional metadata for the purpose of data transformation, for example, the 
element QName for a DOM or AXIOM element.

Generally speaking, I prefer to define the standard metadata if necessary. 
Then the medadata can be collected in many ways, from XML, from annotation 
or from inspection.

>
> So is the real issue the case where mixed types of data objects turn up? 
> Or are there ambiguous cases where you can't tell what the kind of object 
> is?
>

I agree that it's rare for an operation to use mixed types of data. There 
are ambiguous cases though. One simple senario will be using 
java.lang.String to represent data. In the following three operations, [1] 
expects an XML string, [2] expects an plain string, and [3] expects an JSON 
string. Inspection cannot tell the differences without annotations.

[1] String m1(String xmlString);
[2] String m2(String plainString);
[3] String m3(String jsonString);

> I suppose that we can take two views of cases like these:
>
> a) Don't go there, it's not valid.
>
> b) OK, annotate your code enough to tell us exactly what you expect to 
> happen.
>
> If we want to go down the second path, then I'm happy to carry back 
> requirements to the SCA Java WG, but I'd really like an appreciation of 
> just how common this case is likely to be.
>
> Views please....
>
>
> Yours,  Mike.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: tuscany-dev-help@ws.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org


Need spec defined Databindings? Was: (TUSCANY-824) DataBinding: Is it a concern of Programming Model vs. Assembly?

Posted by Mike Edwards <mi...@gmail.com>.
Folks,

OK, finally, I bite  ;-)

The question for me is whether we need the SCA (Java) spec to define 
some standard metadata (typically annotations) for databindings of 
services & references.

I make the assumption that for much of the time, it is possible to work 
out the required databinding simply by inspection of the types of the 
parameters involved.  If you find an SDO object, if you find a JAXB 
object, etc.

So is the real issue the case where mixed types of data objects turn up? 
  Or are there ambiguous cases where you can't tell what the kind of 
object is?

I suppose that we can take two views of cases like these:

a) Don't go there, it's not valid.

b) OK, annotate your code enough to tell us exactly what you expect to 
happen.

If we want to go down the second path, then I'm happy to carry back 
requirements to the SCA Java WG, but I'd really like an appreciation of 
just how common this case is likely to be.

Views please....


Yours,  Mike.


---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org


[jira] Commented: (TUSCANY-824) DataBinding: Is it a concern of Programming Model vs. Assembly?

Posted by "Scott Kurz (JIRA)" <tu...@ws.apache.org>.
    [ https://issues.apache.org/jira/browse/TUSCANY-824?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12510391 ] 

Scott Kurz commented on TUSCANY-824:
------------------------------------

I found a problem in this area when I run with my "promote DataBinding to operation level patch".. not sure if it's useful to tack onto this JIRA or not but here goes:


I'm not sure to what degree there is a problem with Tuscany here.

SOAFP introduced the promotion of input/output/fault DBs to operation level.

This code in Output2OutputTransformer.transform() does:

            } else if (sourceWrapped && (!targetWrapped)) {

               .....
                targetWrapperHandler = getWrapperHandler(getDataBinding(targetOp), false);
                if (targetWrapperHandler != null) {
                    ElementInfo wrapperElement = sourceOp.getWrapper().getInputWrapperElement();
                    // Object targetWrapper =
                    // targetWrapperHandler.create(wrapperElement, context);
                    DataType<XMLType> targetWrapperType = new DataTypeImpl<XMLType>(targetType.getLogical()
                        .getDataBinding(), Object.class, new XMLType(wrapperElement));
                    Object targetWrapper = mediator.mediate(sourceWrapper,
                                                            sourceType.getLogical(),
                                                            targetWrapperType,
                                                            context.getMetadata());

So we use operation DB to get targetWrapperHandler.   But then we do the mediation with the databinding of the output type:

targetType.getLogical().getDataBinding()

This doesn't allow a case where we have SDO DB at the operation level because of an SDO as an input part, but we have a primitive as the output which would have default DB.

I'm not sure if this problem exists without my "DB promotion" patch...  I'd guess it does since I'd expect to be able to put SDO DataBinding annotation on the operation even with a primitive output type.. but I might not understand the rules of the DataBinding annotation.      Given this.. should this be a separate JIRA?  




> DataBinding: Is it a concern of Programming Model vs. Assembly?
> ---------------------------------------------------------------
>
>                 Key: TUSCANY-824
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-824
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SCA Core Runtime
>    Affects Versions: Java-SCA-M2
>            Reporter: ant elder
>            Assignee: Raymond Feng
>            Priority: Critical
>             Fix For: Java-SCA-Next
>
>         Attachments: skurz.824.v1.patch
>
>
> There have been some question about the DataBinding framework and if it should be a concern of the Programming Model vs. Assembly?
> See: http://www.mail-archive.com/tuscany-dev@ws.apache.org/msg08679.html
> and a follow up mention in: http://www.mail-archive.com/tuscany-dev@ws.apache.org/msg09363.html

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org


[jira] Assigned: (TUSCANY-824) DataBinding: Is it a concern of Programming Model vs. Assembly?

Posted by "Raymond Feng (JIRA)" <tu...@ws.apache.org>.
     [ https://issues.apache.org/jira/browse/TUSCANY-824?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Raymond Feng reassigned TUSCANY-824:
------------------------------------

    Assignee: Raymond Feng

> DataBinding: Is it a concern of Programming Model vs. Assembly?
> ---------------------------------------------------------------
>
>                 Key: TUSCANY-824
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-824
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SCA Core
>    Affects Versions: Java-M2
>            Reporter: ant elder
>         Assigned To: Raymond Feng
>            Priority: Blocker
>             Fix For: Java-M2
>
>
> There have been some question about the DataBinding framework and if it should be a concern of the Programming Model vs. Assembly?
> See: http://www.mail-archive.com/tuscany-dev@ws.apache.org/msg08679.html
> and a follow up mention in: http://www.mail-archive.com/tuscany-dev@ws.apache.org/msg09363.html

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org


[jira] Updated: (TUSCANY-824) DataBinding: Is it a concern of Programming Model vs. Assembly?

Posted by "Jim Marino (JIRA)" <tu...@ws.apache.org>.
     [ https://issues.apache.org/jira/browse/TUSCANY-824?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jim Marino updated TUSCANY-824:
-------------------------------

    Fix Version/s:     (was: Java-SCA-2.0-Alpha)
                   Java-SCA-2.0

> DataBinding: Is it a concern of Programming Model vs. Assembly?
> ---------------------------------------------------------------
>
>                 Key: TUSCANY-824
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-824
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SCA Kernel
>    Affects Versions: Java-SCA-2.0-Alpha
>            Reporter: ant elder
>         Assigned To: Raymond Feng
>            Priority: Critical
>             Fix For: Java-SCA-2.0
>
>
> There have been some question about the DataBinding framework and if it should be a concern of the Programming Model vs. Assembly?
> See: http://www.mail-archive.com/tuscany-dev@ws.apache.org/msg08679.html
> and a follow up mention in: http://www.mail-archive.com/tuscany-dev@ws.apache.org/msg09363.html

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org


[jira] Updated: (TUSCANY-824) DataBinding: Is it a concern of Programming Model vs. Assembly?

Posted by "Jean-Sebastien Delfino (JIRA)" <tu...@ws.apache.org>.
     [ https://issues.apache.org/jira/browse/TUSCANY-824?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jean-Sebastien Delfino updated TUSCANY-824:
-------------------------------------------

    Fix Version/s:     (was: Java-M2)
                   Java-M3

> DataBinding: Is it a concern of Programming Model vs. Assembly?
> ---------------------------------------------------------------
>
>                 Key: TUSCANY-824
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-824
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SCA Core
>    Affects Versions: Java-M2
>            Reporter: ant elder
>         Assigned To: Raymond Feng
>            Priority: Blocker
>             Fix For: Java-M3
>
>
> There have been some question about the DataBinding framework and if it should be a concern of the Programming Model vs. Assembly?
> See: http://www.mail-archive.com/tuscany-dev@ws.apache.org/msg08679.html
> and a follow up mention in: http://www.mail-archive.com/tuscany-dev@ws.apache.org/msg09363.html

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org