On 16/12/06, Jean-Sebastien Delfino <[EMAIL PROTECTED]> wrote:

I'd like to change our samples to use SCA wires in their top level
composite files instead of hardcoding the reference binding URIs in the
nested composites.

Here's how things look now:
<composite xmlns="http://www.osoa.org/xmlns/sca/1.0";
   name="bigbank.app">
   <component name="bigbank.AccountManagementComponent">
       <implementation.composite name="bigbank.account"/>
   </component>
   <component name="bigbank.AccountDataManagementComponent">
       <implementation.composite name="bigbank.accountdata"/>
   </component>
  ...
</composite>

<composite xmlns="http://www.osoa.org/xmlns/sca/1.0";
   name="bigbank.account">
...
   <reference name="AccountDataService">
       <binding.sca
uri="
http://localhost:9090/axis2/services/bigbank.AccountDataManagementComponent/AccountDataService
"/>
   </reference>
</composite>

As you can see there are no wires in bigbank.app, and the
AccountDataService reference gets its configuration from a binding URI
attribute.

Here's how they'll look after my change:
<composite xmlns="http://www.osoa.org/xmlns/sca/1.0";
   name="bigbank.app">
   <component name="bigbank.AccountManagementComponent">
       <implementation.composite name="bigbank.account"/>
       <reference
name="AccountDataService">bigbank.AccountDataManagementComponent
/AccountDataService</reference>
   </component>
   <component name="bigbank.AccountDataManagementComponent">
       <implementation.composite name="bigbank.accountdata"/>
   </component>
  ...
</composite>

<composite xmlns="http://www.osoa.org/xmlns/sca/1.0";
   name="bigbank.account">
...
   <reference name="AccountDataService">
       <binding.sca/>
   </reference>
</composite>

Here the binding.sca does not need to be configured, as the
AccountDataService reference is wired in the enclosing bigbank.app
composite. The address of the target service is determined by the Wire
and a base URI configured externally with a TUSCANY_SCACPP_BASE_URI
environment variable.

This is already supported by the runtime and I've verified that it works
but our samples are a little behind and do not show it. If there's no
objection I'll make the changes to the samples some time tomorrow. I
won't change the binding.ws examples that go to well known Web services
like WeatherForecast in the Python sample. This way our samples will
illustrate both schemes.

--
Jean-Sebastien



Great idea.

--
Pete

Reply via email to