You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tuscany.apache.org by Jean-Sebastien Delfino <js...@apache.org> on 2006/12/16 02:40:12 UTC

[C++] Changing hardcoded URIs to SCA wires in the samples

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


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


Re: [C++] Changing hardcoded URIs to SCA wires in the samples

Posted by Jean-Sebastien Delfino <js...@apache.org>.
Pete Robbins wrote:
> On 16/12/06, Jean-Sebastien Delfino <js...@apache.org> 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.
>

I checked in the changes to the samples under revision r487862.

-- 
Jean-Sebastien


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


Re: [C++] Changing hardcoded URIs to SCA wires in the samples

Posted by Pete Robbins <ro...@googlemail.com>.
On 16/12/06, Jean-Sebastien Delfino <js...@apache.org> 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