[ 
https://issues.apache.org/jira/browse/TUSCANY-3026?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12709551#action_12709551
 ] 

Mike Edwards commented on TUSCANY-3026:
---------------------------------------

I have produced a fix for this issue, which enables ASM_4007_TestCase to run.

The fix involves the process by which an Endpoint is propagated down from the 
top level components to the base level component references which sit directly 
above the (non composite) implementations. Basically, the Endpoint is prepared 
at the top level and then is applied to the base level - but unfortuantely, the 
Interface type at the top level is not the same as that on the base level - and 
the fact that the base level actually has a Java Interface gets lost - a WSDL 
interface is applied and the necessary data transformation from Java to WSDL is 
lost.

The change required is in 
org.apache.tuscany.sca.assembly.builder.impl.ReferenceConfigurationUtil in the 
method reconcileReferenceBindings() .

The change causes the EndpointReference from the top level to be Cloned rather 
than simply applied to the base level reference.  In addition, the details of 
the base level reference are copied into the EndpointReference, carrying with 
it the declared Java interface type.

A patch file is attached to this JIRA with the change - I'd appreciate other 
folk checking this over since I'm not convinced that this change alone is the 
full answer.

> Promoted references involving different declared Interface types at different 
> levels in the hierarchy fail
> ----------------------------------------------------------------------------------------------------------
>
>                 Key: TUSCANY-3026
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-3026
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SCA Core Runtime
>    Affects Versions: Java-SCA-2.0
>            Reporter: Mike Edwards
>            Assignee: Mike Edwards
>             Fix For: Java-SCA-2.0
>
>         Attachments: Tuscany_3026.patch
>
>
> This JIRA is raised since Tuscany Java SCA fails the OASIS SCA Assembly 
> testcase
> ASM_4007_TestCase.
> The failure is manifested by an exception at runtime when a Reference is 
> invoked, where a null databinding is reported.
> The testcase involves 3 level of composites - Top level (A), middle tier (B) 
> and bottom level (C). A has a component that hsa B as its implementation and 
> B has a component with C as its implementation and C contains a single 
> component with a Java POJO implementation.  The Java POJO has a single 
> reference, which is successively promoted to the top level and is wired to a 
> target service at the top level, through a reference target on the component 
> in A.
> The significant feature of the arrangement is that the reference is declared 
> explicitly with a Java interface in C, but in B and in A the reference is 
> explicitly declared with an equivalent WSDL interface (the WSDL is a direct 
> translation of the Java).
> The failure occurs because of the WSDL interface on the Composite Reference 
> in B - chaning this for a Java interface, or removing the explicit 
> declaration from this place makes the error go away.

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

Reply via email to