You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tuscany.apache.org by Tony Wang <fw...@gmail.com> on 2007/05/25 07:49:51 UTC

(SCA)How can get the service by composite service name

hi,
 I have download the samples and run the Calculator sample success.
 But when I add a composite service on the composite file,how can i get the service by the composite service name.
 
 For the calculator example,how I can get the service by the name "CalculatorService"?
 
<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"  name="Calculator">

    <service name="CalculatorService" promote="CalculatorServiceComponent">
        <interface.java interface="calculator.CalculatorService"/>
    </service>
 
    <component name="CalculatorServiceComponent">
        <implementation.java class="calculator.CalculatorServiceImpl"/>
        <reference name="addService" target="AddServiceComponent" />
        <reference name="subtractService" target="SubtractServiceComponent" />
        <reference name="multiplyService" target="MultiplyServiceComponent" />
        <reference name="divideService" target="DivideServiceComponent" />
    </component>
    <component name="AddServiceComponent">
        <implementation.java class="calculator.AddServiceImpl"/>
    </component>
    <component name="SubtractServiceComponent">
        <implementation.java class="calculator.SubtractServiceImpl"/>
    </component>
    <component name="MultiplyServiceComponent">
        <implementation.java class="calculator.MultiplyServiceImpl"/>
    </component>
    <component name="DivideServiceComponent">
        <implementation.java class="calculator.DivideServiceImpl"/>
    </component>
</composite>


Thanks,
  Tony

Re: (SCA)How can get the service by composite service name

Posted by Huang Kai <pr...@gmail.com>.
So, as I understand, once a <component> element is defined in a composite file, this component is treated as service by default.
If one can access service just by getService("componentName/serviceName"), there will be no need to define <service>  for service exposed by component ?
And there's no way to hide a component in composite from being accessed, even this component is used solely for reference?


----- Original Message ----- 
From: "Jean-Sebastien Delfino" <js...@apache.org>
To: <tu...@ws.apache.org>
Sent: Friday, June 01, 2007 12:15 AM
Subject: Re: (SCA)How can get the service by composite service name


> [snip]
> Raymond Feng wrote:
>> Hi,
>>
>> By the SCA spec, when a deployable composite is added to the SCA 
>> domain, it's "included" by the logical SCA domain composite. As a 
>> result, all top-level components must have unique names.
>>
>> Thanks,
>> Raymond
>>
>> ----- Original Message ----- From: "Huang Kai" <pr...@gmail.com>
>> To: <tu...@ws.apache.org>
>> Cc: "???" <wa...@primeton.com>; "jiaoly" <ji...@primeton.com>; "??" 
>> <wa...@primeton.com>
>> Sent: Thursday, May 31, 2007 2:03 AM
>> Subject: Re: (SCA)How can get the service by composite service name
>>
>>
>>> I understood. It seems so.
>>>
>>> While this raise another question: Tuscany seemed skipped the 
>>> 'composite' layer and direct access component service, then how to 
>>> access services in two composites within same domain?
>>>
>>> like this:
>>>
>>> --------------------------------------------------------------------
>>>
>>> CompositeA.composite:
>>>
>>> <composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
>>> targetNamespace=http://www.globalfinance.com/NASDAQ"
>>> name="NASDAQ">
>>>
>>> <component name="StockQuoteServiceComponent">
>>>
>>>    <implementation.java class="com.ibm.stock.StockQuoteServiceImpl"/>
>>>
>>> </component>
>>>
>>> </composite>
>>>
>>> --------------------------------------------------------------------
>>>
>>> CompositeB.composite:
>>>
>>> <composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
>>> targetNamespace=http://www.globalfinance.com/HongKong"
>>> name="HongKong">
>>>
>>> <component name="StockQuoteServiceComponent">
>>>
>>>    <implementation.java class="com.lenovo.stock.StockQuoteServiceImpl"/>
>>>
>>> </component>
>>>
>>> </composite>
>>>
>>> ------------------------------------------------------------------------------- 
>>>
>>>
>>> When these two composite all loaded in one SCADomain.
>>>
>>> How do I get StockQuoteService supplied by CompositeB or CompositeA?
>>>
>>> How can SCADomain.getService(Class, String) handle such name conflict?
>>>
>>>
>>>
> 
> Adding composites to a domain is described in section 1.10.6.1.
> 
> 3075 1.10.6.1 add To Domain-Level Composite
> 3076 This functionality adds the composite identified by a supplied URI 
> to the Domain Level
> 3077 Composite. The supplied composite URI must refer to a composite 
> within a installed contribution.
> 3078 The composite's installed contribution determines how the 
> composite’s artifacts are resolved
> 3079 (directly and indirectly). The supplied composite is added to the 
> domain composite with
> 3080 semantics that correspond to the domain-level composite having an 
> <include> statement that
> 3081 references the supplied composite. All of the composite’s 
> components become top-level
> 3082 components and the services become externally visible services (eg. 
> they would be present in a
> 3083 WSDL description of the domain).
> 
> So in your example you could do:
> 
> CompositeA.composite:
> 
> <composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
> targetNamespace=http://www.globalfinance.com/NASDAQ"
> name="NASDAQ">
> 
> <component name="NasdaqStockQuoteServiceComponent">
> 
>   <implementation.java class="com.ibm.stock.StockQuoteServiceImpl"/>
> 
> </component>
> 
> </composite>
> 
> --------------------------------------------------------------------
> 
> CompositeB.composite:
> 
> <composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
> targetNamespace=http://www.globalfinance.com/HongKong"
> name="HongKong">
> 
> <component name="HongKongStockQuoteServiceComponent">
> 
>   <implementation.java class="com.lenovo.stock.StockQuoteServiceImpl"/>
> 
> </component>
> 
> </composite>
> 
> 
> Then call domain.getService(StockQuote.class, 
> "NasdaqStockQuoteServiceComponent") and 
> domain.getService(StockQuote.class, "HongKongStockQuoteServiceComponent").
> 
> 
> Hope this helps.
> 
> -- 
> Jean-Sebastien
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: tuscany-dev-help@ws.apache.org
>

Re: (SCA)How can get the service by composite service name

Posted by Jean-Sebastien Delfino <js...@apache.org>.
[snip]
Raymond Feng wrote:
> Hi,
>
> By the SCA spec, when a deployable composite is added to the SCA 
> domain, it's "included" by the logical SCA domain composite. As a 
> result, all top-level components must have unique names.
>
> Thanks,
> Raymond
>
> ----- Original Message ----- From: "Huang Kai" <pr...@gmail.com>
> To: <tu...@ws.apache.org>
> Cc: "???" <wa...@primeton.com>; "jiaoly" <ji...@primeton.com>; "??" 
> <wa...@primeton.com>
> Sent: Thursday, May 31, 2007 2:03 AM
> Subject: Re: (SCA)How can get the service by composite service name
>
>
>> I understood. It seems so.
>>
>> While this raise another question: Tuscany seemed skipped the 
>> 'composite' layer and direct access component service, then how to 
>> access services in two composites within same domain?
>>
>> like this:
>>
>> --------------------------------------------------------------------
>>
>> CompositeA.composite:
>>
>> <composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
>> targetNamespace=http://www.globalfinance.com/NASDAQ"
>> name="NASDAQ">
>>
>> <component name="StockQuoteServiceComponent">
>>
>>    <implementation.java class="com.ibm.stock.StockQuoteServiceImpl"/>
>>
>> </component>
>>
>> </composite>
>>
>> --------------------------------------------------------------------
>>
>> CompositeB.composite:
>>
>> <composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
>> targetNamespace=http://www.globalfinance.com/HongKong"
>> name="HongKong">
>>
>> <component name="StockQuoteServiceComponent">
>>
>>    <implementation.java class="com.lenovo.stock.StockQuoteServiceImpl"/>
>>
>> </component>
>>
>> </composite>
>>
>> ------------------------------------------------------------------------------- 
>>
>>
>> When these two composite all loaded in one SCADomain.
>>
>> How do I get StockQuoteService supplied by CompositeB or CompositeA?
>>
>> How can SCADomain.getService(Class, String) handle such name conflict?
>>
>>
>>

Adding composites to a domain is described in section 1.10.6.1.

3075 1.10.6.1 add To Domain-Level Composite
3076 This functionality adds the composite identified by a supplied URI 
to the Domain Level
3077 Composite. The supplied composite URI must refer to a composite 
within a installed contribution.
3078 The composite's installed contribution determines how the 
composite’s artifacts are resolved
3079 (directly and indirectly). The supplied composite is added to the 
domain composite with
3080 semantics that correspond to the domain-level composite having an 
<include> statement that
3081 references the supplied composite. All of the composite’s 
components become top-level
3082 components and the services become externally visible services (eg. 
they would be present in a
3083 WSDL description of the domain).

So in your example you could do:

CompositeA.composite:

<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
targetNamespace=http://www.globalfinance.com/NASDAQ"
name="NASDAQ">

<component name="NasdaqStockQuoteServiceComponent">

   <implementation.java class="com.ibm.stock.StockQuoteServiceImpl"/>

</component>

</composite>

--------------------------------------------------------------------

CompositeB.composite:

<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
targetNamespace=http://www.globalfinance.com/HongKong"
name="HongKong">

<component name="HongKongStockQuoteServiceComponent">

   <implementation.java class="com.lenovo.stock.StockQuoteServiceImpl"/>

</component>

</composite>


Then call domain.getService(StockQuote.class, 
"NasdaqStockQuoteServiceComponent") and 
domain.getService(StockQuote.class, "HongKongStockQuoteServiceComponent").


Hope this helps.

-- 
Jean-Sebastien


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


Re: (SCA)How can get the service by composite service name

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

By the SCA spec, when a deployable composite is added to the SCA domain, 
it's "included" by the logical SCA domain composite. As a result, all 
top-level components must have unique names.

Thanks,
Raymond

----- Original Message ----- 
From: "Huang Kai" <pr...@gmail.com>
To: <tu...@ws.apache.org>
Cc: "???" <wa...@primeton.com>; "jiaoly" <ji...@primeton.com>; "??" 
<wa...@primeton.com>
Sent: Thursday, May 31, 2007 2:03 AM
Subject: Re: (SCA)How can get the service by composite service name


>I understood. It seems so.
>
> While this raise another question: Tuscany seemed skipped the 'composite' 
> layer and direct access component service, then how to access services in 
> two composites within same domain?
>
> like this:
>
> --------------------------------------------------------------------
>
> CompositeA.composite:
>
> <composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
> targetNamespace=http://www.globalfinance.com/NASDAQ"
> name="NASDAQ">
>
> <component name="StockQuoteServiceComponent">
>
>    <implementation.java class="com.ibm.stock.StockQuoteServiceImpl"/>
>
> </component>
>
> </composite>
>
> --------------------------------------------------------------------
>
> CompositeB.composite:
>
> <composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
> targetNamespace=http://www.globalfinance.com/HongKong"
> name="HongKong">
>
> <component name="StockQuoteServiceComponent">
>
>    <implementation.java class="com.lenovo.stock.StockQuoteServiceImpl"/>
>
> </component>
>
> </composite>
>
> -------------------------------------------------------------------------------
>
> When these two composite all loaded in one SCADomain.
>
> How do I get StockQuoteService supplied by CompositeB or CompositeA?
>
> How can SCADomain.getService(Class, String) handle such name conflict?
>
>
>
> ----- Original Message ----- 
> From: "Jean-Sebastien Delfino" <js...@apache.org>
> To: <tu...@ws.apache.org>
> Sent: Wednesday, May 30, 2007 12:24 PM
> Subject: Re: (SCA)How can get the service by composite service name
>
>
>> Comments inline.
>>
>> Huang Kai wrote:
>>> Yes, the codes seems does so.
>>> But it's rather strange to access a service not by 'service name' 
>>> exposed by compoiste, but by directly accessing component nested in a 
>>> composite.
>>>
>>
>> Here's a little more info that will help explain that design:
>>
>> - When a composite is added to a domain, it is actually included in it,
>> so there is really no nesting. Components declared in the composite
>> become top level components as if they had been directly declared in the
>> composite describing the entire domain. This process is described in the
>> SCA assembly spec 1.0 in section 1.10.6.1:
>> 1.10.6.1 add To Domain-Level Composite
>> 3076 This functionality adds the composite identified by a supplied URI
>> to the Domain Level
>> 3077 Composite. The supplied composite URI must refer to a composite
>> within a installed contribution.
>> 3078 The composite's installed contribution determines how the
>> composite’s artifacts are resolved
>> 3079 (directly and indirectly). The supplied composite is added to the
>> domain composite with
>> 3080 semantics that correspond to the domain-level composite having an
>> <include> statement that
>> 3081 references the supplied composite. All of the composite’s
>> components become top-level
>> 3082 components and the services become externally visible services (eg.
>> they would be present in a
>> 3083 WSDL description of the domain).
>>
>> - Services offered by components in the composite become visible, and
>> can be addressed in a form consistent with what you would say in the
>> target of an SCA wire or reference, as described in section 1.6.4 of the
>> SCA assembly spec:
>> 1613 The reference element of a component and the reference element of a
>> service has a list
>> 1614 of one or more of the following wire-target-URI values for the
>> target, with multiple values
>> 1615 separated by a space:
>> 1616 • <component-name>/<service-name>
>> 1617 o where the target is a service of a component. The specification
>> of the service name
>> 1618 is optional if the target component only has one service with a
>> compatible interface
>>
>> As the spec says "the target is a service of a component". A service is
>> not really offered by a composite, it is offered by a component. A
>> composite service declaration is just a statement that a service offered
>> by a component should be promoted / made visible to the next level of
>> composition, when the particular composite is used as a (composite)
>> component implementation (using an <implementation.composite> element).
>> The service promoted by the composite service will then be offered by
>> that new component.
>>
>> Also, some components only offer one service for a given interface. In
>> that case you don't have to specify the service name, the component name
>> is sufficient to get the service matching the requested interface.
>>
>> So in your particular example:
>> - CalculatorServiceComponent is a top-level component.
>> - getService(CalculatorService.class, "CalculatorServiceComponent") is a
>> short form for getService(CalculatorService.class,
>> "CalculatorServiceComponent/CalculatorService"), you don't need to
>> specify the service name as CalculatorServiceComponent only provides one
>> service.
>>
>> Hope this helps.
>>
>>> ----- Original Message ----- 
>>> From: "Simon Laws" <si...@googlemail.com>
>>> To: <tu...@ws.apache.org>
>>> Sent: Friday, May 25, 2007 10:03 PM
>>> Subject: Re: (SCA)How can get the service by composite service name
>>>
>>>
>>>
>>>> Hi Tony,
>>>>
>>>> I'm assuming you are using the sample CalculatorClient style code try 
>>>> to
>>>> access the service, i.e. the part that uses the scaDomain to get a 
>>>> local
>>>> reference to a component service.
>>>>
>>>>        CalculatorService calculatorService =
>>>>            scaDomain.getService(CalculatorService.class,
>>>> "CalculatorServiceComponent");
>>>>
>>>> I just took a look at the code and currently the code behind this 
>>>> method
>>>> only looks at the components available in the domain composite when 
>>>> looking
>>>> for the named service, i.e. It's looking for a component and a service 
>>>> it
>>>> provides rather than a composite service that refers to a component 
>>>> service.
>>>> The term service is a little confusing in this regard in my opinion.
>>>>
>>>> Regards
>>>>
>>>> Simon
>>>>
>>> >
>>
>>
>> -- 
>> Jean-Sebastien
>>
>>
>> ---------------------------------------------------------------------
>> 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: (SCA)How can get the service by composite service name

Posted by Huang Kai <pr...@gmail.com>.
I understood. It seems so. 

While this raise another question: Tuscany seemed skipped the 'composite' layer and direct access component service, then how to access services in two composites within same domain?

like this:

--------------------------------------------------------------------

CompositeA.composite:

<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" 
targetNamespace=http://www.globalfinance.com/NASDAQ" 
name="NASDAQ">

<component name="StockQuoteServiceComponent">

    <implementation.java class="com.ibm.stock.StockQuoteServiceImpl"/>

</component>

</composite>

--------------------------------------------------------------------

CompositeB.composite:

<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" 
targetNamespace=http://www.globalfinance.com/HongKong" 
name="HongKong">

<component name="StockQuoteServiceComponent">

    <implementation.java class="com.lenovo.stock.StockQuoteServiceImpl"/>

</component>

</composite>

-------------------------------------------------------------------------------

When these two composite all loaded in one SCADomain.

How do I get StockQuoteService supplied by CompositeB or CompositeA?

How can SCADomain.getService(Class, String) handle such name conflict?



----- Original Message ----- 
From: "Jean-Sebastien Delfino" <js...@apache.org>
To: <tu...@ws.apache.org>
Sent: Wednesday, May 30, 2007 12:24 PM
Subject: Re: (SCA)How can get the service by composite service name


> Comments inline.
> 
> Huang Kai wrote:
>> Yes, the codes seems does so.
>> But it's rather strange to access a service not by 'service name' exposed by compoiste, but by directly accessing component nested in a composite.
>>   
> 
> Here's a little more info that will help explain that design:
> 
> - When a composite is added to a domain, it is actually included in it, 
> so there is really no nesting. Components declared in the composite 
> become top level components as if they had been directly declared in the 
> composite describing the entire domain. This process is described in the 
> SCA assembly spec 1.0 in section 1.10.6.1:
> 1.10.6.1 add To Domain-Level Composite
> 3076 This functionality adds the composite identified by a supplied URI 
> to the Domain Level
> 3077 Composite. The supplied composite URI must refer to a composite 
> within a installed contribution.
> 3078 The composite's installed contribution determines how the 
> composite’s artifacts are resolved
> 3079 (directly and indirectly). The supplied composite is added to the 
> domain composite with
> 3080 semantics that correspond to the domain-level composite having an 
> <include> statement that
> 3081 references the supplied composite. All of the composite’s 
> components become top-level
> 3082 components and the services become externally visible services (eg. 
> they would be present in a
> 3083 WSDL description of the domain).
> 
> - Services offered by components in the composite become visible, and 
> can be addressed in a form consistent with what you would say in the 
> target of an SCA wire or reference, as described in section 1.6.4 of the 
> SCA assembly spec:
> 1613 The reference element of a component and the reference element of a 
> service has a list
> 1614 of one or more of the following wire-target-URI values for the 
> target, with multiple values
> 1615 separated by a space:
> 1616 • <component-name>/<service-name>
> 1617 o where the target is a service of a component. The specification 
> of the service name
> 1618 is optional if the target component only has one service with a 
> compatible interface
> 
> As the spec says "the target is a service of a component". A service is 
> not really offered by a composite, it is offered by a component. A 
> composite service declaration is just a statement that a service offered 
> by a component should be promoted / made visible to the next level of 
> composition, when the particular composite is used as a (composite) 
> component implementation (using an <implementation.composite> element). 
> The service promoted by the composite service will then be offered by 
> that new component.
> 
> Also, some components only offer one service for a given interface. In 
> that case you don't have to specify the service name, the component name 
> is sufficient to get the service matching the requested interface.
> 
> So in your particular example:
> - CalculatorServiceComponent is a top-level component.
> - getService(CalculatorService.class, "CalculatorServiceComponent") is a 
> short form for getService(CalculatorService.class, 
> "CalculatorServiceComponent/CalculatorService"), you don't need to 
> specify the service name as CalculatorServiceComponent only provides one 
> service.
> 
> Hope this helps.
> 
>> ----- Original Message ----- 
>> From: "Simon Laws" <si...@googlemail.com>
>> To: <tu...@ws.apache.org>
>> Sent: Friday, May 25, 2007 10:03 PM
>> Subject: Re: (SCA)How can get the service by composite service name
>>
>>
>>   
>>> Hi Tony,
>>>
>>> I'm assuming you are using the sample CalculatorClient style code try to
>>> access the service, i.e. the part that uses the scaDomain to get a local
>>> reference to a component service.
>>>
>>>        CalculatorService calculatorService =
>>>            scaDomain.getService(CalculatorService.class,
>>> "CalculatorServiceComponent");
>>>
>>> I just took a look at the code and currently the code behind this method
>>> only looks at the components available in the domain composite when looking
>>> for the named service, i.e. It's looking for a component and a service it
>>> provides rather than a composite service that refers to a component service.
>>> The term service is a little confusing in this regard in my opinion.
>>>
>>> Regards
>>>
>>> Simon
>>>     
>> >
> 
> 
> -- 
> Jean-Sebastien
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: tuscany-dev-help@ws.apache.org
>

Re: (SCA)How can get the service by composite service name

Posted by Jean-Sebastien Delfino <js...@apache.org>.
Comments inline.

Huang Kai wrote:
> Yes, the codes seems does so.
> But it's rather strange to access a service not by 'service name' exposed by compoiste, but by directly accessing component nested in a composite.
>   

Here's a little more info that will help explain that design:

- When a composite is added to a domain, it is actually included in it, 
so there is really no nesting. Components declared in the composite 
become top level components as if they had been directly declared in the 
composite describing the entire domain. This process is described in the 
SCA assembly spec 1.0 in section 1.10.6.1:
1.10.6.1 add To Domain-Level Composite
3076 This functionality adds the composite identified by a supplied URI 
to the Domain Level
3077 Composite. The supplied composite URI must refer to a composite 
within a installed contribution.
3078 The composite's installed contribution determines how the 
composite’s artifacts are resolved
3079 (directly and indirectly). The supplied composite is added to the 
domain composite with
3080 semantics that correspond to the domain-level composite having an 
<include> statement that
3081 references the supplied composite. All of the composite’s 
components become top-level
3082 components and the services become externally visible services (eg. 
they would be present in a
3083 WSDL description of the domain).

- Services offered by components in the composite become visible, and 
can be addressed in a form consistent with what you would say in the 
target of an SCA wire or reference, as described in section 1.6.4 of the 
SCA assembly spec:
1613 The reference element of a component and the reference element of a 
service has a list
1614 of one or more of the following wire-target-URI values for the 
target, with multiple values
1615 separated by a space:
1616 • <component-name>/<service-name>
1617 o where the target is a service of a component. The specification 
of the service name
1618 is optional if the target component only has one service with a 
compatible interface

As the spec says "the target is a service of a component". A service is 
not really offered by a composite, it is offered by a component. A 
composite service declaration is just a statement that a service offered 
by a component should be promoted / made visible to the next level of 
composition, when the particular composite is used as a (composite) 
component implementation (using an <implementation.composite> element). 
The service promoted by the composite service will then be offered by 
that new component.

Also, some components only offer one service for a given interface. In 
that case you don't have to specify the service name, the component name 
is sufficient to get the service matching the requested interface.

So in your particular example:
- CalculatorServiceComponent is a top-level component.
- getService(CalculatorService.class, "CalculatorServiceComponent") is a 
short form for getService(CalculatorService.class, 
"CalculatorServiceComponent/CalculatorService"), you don't need to 
specify the service name as CalculatorServiceComponent only provides one 
service.

Hope this helps.

> ----- Original Message ----- 
> From: "Simon Laws" <si...@googlemail.com>
> To: <tu...@ws.apache.org>
> Sent: Friday, May 25, 2007 10:03 PM
> Subject: Re: (SCA)How can get the service by composite service name
>
>
>   
>> Hi Tony,
>>
>> I'm assuming you are using the sample CalculatorClient style code try to
>> access the service, i.e. the part that uses the scaDomain to get a local
>> reference to a component service.
>>
>>        CalculatorService calculatorService =
>>            scaDomain.getService(CalculatorService.class,
>> "CalculatorServiceComponent");
>>
>> I just took a look at the code and currently the code behind this method
>> only looks at the components available in the domain composite when looking
>> for the named service, i.e. It's looking for a component and a service it
>> provides rather than a composite service that refers to a component service.
>> The term service is a little confusing in this regard in my opinion.
>>
>> Regards
>>
>> Simon
>>     
> >


-- 
Jean-Sebastien


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


Re: (SCA)How can get the service by composite service name

Posted by Huang Kai <pr...@gmail.com>.
Yes, the codes seems does so.
But it's rather strange to access a service not by 'service name' exposed by compoiste, but by directly accessing component nested in a composite.

----- Original Message ----- 
From: "Simon Laws" <si...@googlemail.com>
To: <tu...@ws.apache.org>
Sent: Friday, May 25, 2007 10:03 PM
Subject: Re: (SCA)How can get the service by composite service name


> Hi Tony,
> 
> I'm assuming you are using the sample CalculatorClient style code try to
> access the service, i.e. the part that uses the scaDomain to get a local
> reference to a component service.
> 
>        CalculatorService calculatorService =
>            scaDomain.getService(CalculatorService.class,
> "CalculatorServiceComponent");
> 
> I just took a look at the code and currently the code behind this method
> only looks at the components available in the domain composite when looking
> for the named service, i.e. It's looking for a component and a service it
> provides rather than a composite service that refers to a component service.
> The term service is a little confusing in this regard in my opinion.
> 
> Regards
> 
> Simon
>

Re: (SCA)How can get the service by composite service name

Posted by Simon Laws <si...@googlemail.com>.
Hi Tony,

I'm assuming you are using the sample CalculatorClient style code try to
access the service, i.e. the part that uses the scaDomain to get a local
reference to a component service.

        CalculatorService calculatorService =
            scaDomain.getService(CalculatorService.class,
"CalculatorServiceComponent");

I just took a look at the code and currently the code behind this method
only looks at the components available in the domain composite when looking
for the named service, i.e. It's looking for a component and a service it
provides rather than a composite service that refers to a component service.
The term service is a little confusing in this regard in my opinion.

Regards

Simon