You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@tuscany.apache.org by Ruault Gaetan <gr...@sopragroup.com> on 2010/06/25 15:58:21 UTC
How to use properties in Sca Composite
Hi,
Is it possible to use properties in SCA composite with something like
this ?:
<sca:binding.ws uri="http://
<http://$HOST_NAME:$PORT/SituationPersonne"/>
$HOST_NAME:$PORT/SituationPersonne"/>
thanks
Gaetan
Re: How to use properties in Sca Composite
Posted by Simon Laws <si...@googlemail.com>.
On Fri, Jun 25, 2010 at 6:01 PM, Raymond Feng <en...@gmail.com> wrote:
> Hi,
> This is actually a very question. Are you proposing a URI "template" idea
> that we can use to represent the binding endpoint (with some parameters can
> be replaced by the hosting environment)? Please tell us a bit more your use
> case.
> I started a wiki page before trying to understand the need for the service
> binding to control which IP address the service will listen on for a
> multi-homed machine. It might be related to this discussion too.
> https://cwiki.apache.org/confluence/display/TUSCANYWIKI/IP+addresses+for+service+bindings
> Raymond
> ________________________________________________________________
> Raymond Feng
> rfeng@apache.org
> Apache Tuscany PMC member and committer: tuscany.apache.org
> Co-author of Tuscany SCA In Action book: www.tuscanyinaction.com
> Personal Web Site: www.enjoyjava.com
> ________________________________________________________________
> On Jun 25, 2010, at 6:58 AM, Ruault Gaetan wrote:
>
>
> Hi,
>
> Is it possible to use properties in SCA composite with something like this
> ?:
>
>
> <sca:binding.ws uri="http://$HOST_NAME:$PORT/SituationPersonne"/>
>
>
>
> thanks
>
> Gaetan
>
Mike made changes in Tuscany to allow this to be done with DTDs so he
could parameterize the WS otest composites. Here's an example
composite [1] and the projects that contains and configures it [2],
look for the .dtd [3].
So if the DTD approach suits this could help you.
Simon
[1] http://tools.oasis-open.org/version-control/browse/wsvn/sca-bindings/TestCases_BWS/BWS_General/src/main/resources/Test_BWS_4004.composite
[2] http://tools.oasis-open.org/version-control/browse/wsvn/sca-bindings/TestCases_BWS/BWS_General/src/main/resources/#_TestCases_BWS_BWS_General_src_main_resources_
[3] http://tools.oasis-open.org/version-control/browse/wsvn/sca-bindings/TestCases_BWS/BWS_General/src/main/resources/sca_variables.dtd
--
Apache Tuscany committer: tuscany.apache.org
Co-author of a book about Tuscany and SCA: tuscanyinaction.com
RE: How to use properties in Sca Composite
Posted by Ruault Gaetan <gr...@sopragroup.com>.
Hi Raymond,
I have a composite hosted in a machine and many references hosted in other machines then i like to store hosts adresses in a propertie file like this :
situationPersonneService.host = 192.168.0.1
situationPersonneService.port = 8084
situationContratService.host = 192.168.0.2
situationContratService.port = 8084
and a sca:reference like this :
<sca:reference name="situationPersonneService" >
<sca:interface.java interface="com.c2c.referentiel.personne.am.SituationPersonneAm"/>
<sca:binding.ws uri="http://{situationPersonneService.host}:{situationPersonneService.port}/petals/services/SituationPersonne"/>
</sca:reference>
I think this use is very good because, tusany users are free to determine the "URI pattern" for their best use.
thanks
Gaetan
________________________________
De : Raymond Feng [mailto:enjoyjava@gmail.com]
Envoyé : vendredi 25 juin 2010 19:02
À : user@tuscany.apache.org; dev@tuscany.apache.org
Objet : Re: How to use properties in Sca Composite
Hi,
This is actually a very question. Are you proposing a URI "template" idea that we can use to represent the binding endpoint (with some parameters can be replaced by the hosting environment)? Please tell us a bit more your use case.
I started a wiki page before trying to understand the need for the service binding to control which IP address the service will listen on for a multi-homed machine. It might be related to this discussion too.
https://cwiki.apache.org/confluence/display/TUSCANYWIKI/IP+addresses+for+service+bindings
Raymond
________________________________________________________________
Raymond Feng
rfeng@apache.org
Apache Tuscany PMC member and committer: tuscany.apache.org
Co-author of Tuscany SCA In Action book: www.tuscanyinaction.com
Personal Web Site: www.enjoyjava.com
________________________________________________________________
On Jun 25, 2010, at 6:58 AM, Ruault Gaetan wrote:
Hi,
Is it possible to use properties in SCA composite with something like this ?:
<sca:binding.ws uri="http:// <http://$HOST_NAME:$PORT/SituationPersonne"/> $HOST_NAME:$PORT/SituationPersonne"/ <http://$HOST_NAME:$PORT/SituationPersonne"/> <http://$HOST_NAME:$PORT/SituationPersonne"/> >
thanks
Gaetan
Re: How to use properties in Sca Composite
Posted by Raymond Feng <en...@gmail.com>.
Hi,
This is actually a very question. Are you proposing a URI "template" idea that we can use to represent the binding endpoint (with some parameters can be replaced by the hosting environment)? Please tell us a bit more your use case.
I started a wiki page before trying to understand the need for the service binding to control which IP address the service will listen on for a multi-homed machine. It might be related to this discussion too.
https://cwiki.apache.org/confluence/display/TUSCANYWIKI/IP+addresses+for+service+bindings
Raymond
________________________________________________________________
Raymond Feng
rfeng@apache.org
Apache Tuscany PMC member and committer: tuscany.apache.org
Co-author of Tuscany SCA In Action book: www.tuscanyinaction.com
Personal Web Site: www.enjoyjava.com
________________________________________________________________
On Jun 25, 2010, at 6:58 AM, Ruault Gaetan wrote:
>
> Hi,
>
> Is it possible to use properties in SCA composite with something like this ?:
>
> <sca:binding.ws uri="http://$HOST_NAME:$PORT/SituationPersonne"/>
>
>
> thanks
>
> Gaetan
>
Re: How to use properties in Sca Composite
Posted by Raymond Feng <en...@gmail.com>.
Hi,
This is actually a very question. Are you proposing a URI "template" idea that we can use to represent the binding endpoint (with some parameters can be replaced by the hosting environment)? Please tell us a bit more your use case.
I started a wiki page before trying to understand the need for the service binding to control which IP address the service will listen on for a multi-homed machine. It might be related to this discussion too.
https://cwiki.apache.org/confluence/display/TUSCANYWIKI/IP+addresses+for+service+bindings
Raymond
________________________________________________________________
Raymond Feng
rfeng@apache.org
Apache Tuscany PMC member and committer: tuscany.apache.org
Co-author of Tuscany SCA In Action book: www.tuscanyinaction.com
Personal Web Site: www.enjoyjava.com
________________________________________________________________
On Jun 25, 2010, at 6:58 AM, Ruault Gaetan wrote:
>
> Hi,
>
> Is it possible to use properties in SCA composite with something like this ?:
>
> <sca:binding.ws uri="http://$HOST_NAME:$PORT/SituationPersonne"/>
>
>
> thanks
>
> Gaetan
>