Please read my note on the Interface contracts of RuntimeEndpoint/RuntimeEndpointReference.

In this particular case, we optimize binding.sca by connecting the endpoint reference invocation to the endpoint invocation chain. We choose to transform the data within the endpoint reference invocation chain:

1) The source contract is the sourceComponentType.reference.interfaceContract

2) We (should) set the bindingInterfaceContract for the endpoint reference to be the targetComponentType.service.interfaceContract so that the data will be transformed from databinding that the source component implementation code uses to the one that target component implementation code expects.

3) We (should) set the bindingInterfaceContract for the endpoint to be the targetComponentType.service.interfaceContract so that no data transformation is needed within the endpoint invocation chain.

If the target endpoint is remote, then it follows the regular split of endpoint reference and endpoint. Each side would deal with the data transformations between the binding layer and componentType requirements.

We could fix the RuntimeSCAReferenceBindingProvider and RuntimeSCAServiceBindingProvider to set up the binding interface contract according to proposal above.

Thanks,
Raymond
--------------------------------------------------
From: "Simon Laws" <[email protected]>
Sent: Tuesday, November 17, 2009 6:57 AM
To: "tuscany-dev" <[email protected]>
Subject: Re: [2.x] Assembly otest regression

I note that RuntimeSCAReferenceBindingProvider method for retrieving
the binding contract has changed from

   public InterfaceContract getBindingInterfaceContract() {
       if (isTargetRemote()) {
           return getDistributedProvider().getBindingInterfaceContract();
       } else {
           if (reference.getReference() != null) {
               return reference.getReference().getInterfaceContract();
           } else {
               return reference.getInterfaceContract();
           }
       }
   }


to

   public InterfaceContract getBindingInterfaceContract() {
       if (isTargetRemote()) {
           return getDistributedProvider().getBindingInterfaceContract();
       } else {
           // Check if there is a target
           RuntimeEndpoint endpoint =
(RuntimeEndpoint)endpointReference.getTargetEndpoint();
           if (endpoint != null) {
               // Use the target binding interface contract
               return endpoint.getBindingInterfaceContract();
           } else {
               return endpointReference.getReferenceInterfaceContract();
           }
       }
   }

Which in the 4001 case returns the WSDL contract of the target
service. So I imagine the resulting effect will be to try and convert
the Jva types to WSDL types and then back again as messages pass end
to end through the sca binding. Now this doesn't actually work for
this test for some reason but I'd like to understand the intention.

Simon

Reply via email to