Good question! We ran into the same issue here. Tuscany SCA doesn't have a built-in way to handle the externalization of such configuration. We end up doing the substitution using some kind of scripts.
Similar frameworks such as Spring provides some support for the env/profile based customizations. Maybe we should do something is Tuscany to support that. One idea could be the StAXArtifactProcessor to pre-process the composite files before XML parsing. Thanks, Raymond ________________________________________________________________ Raymond Feng [email protected] Apache Software Foundation Member 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 Oct 25, 2011, at 1:43 PM, Melinamani, Sanjay wrote: > Hi, > I like to externalize the webservice reference URL to a property file. > Example if I have the following composite, I like to read the URI from a > property file since the URI changes from DEV to QA to PROD env. Let me know > how this can be done? > > <composite xmlns="http://www.osoa.org/xmlns/sca/1.0" > targetNamespace="http://helloworld" > xmlns:hw=http://helloworld name="helloworldws"> > <component name="HelloWorldServiceComponent"> > <implementation.java class="helloworld.HelloWorldImpl" /> > <service name="HelloWorldService"> > <interface.wsdl > interface="http://helloworld#wsdl.interface(HelloWorld)" /> > <binding.ws > uri="http://localhost:8085/HelloWorldService"/> > </service> > </component> > </composite> > > Thanks > Sanjay >
