Hi to all, with your help I've almost finished my project, anyway I've a problem about namespaces... in my example I want to use not onlt my own developed implementation but also the classical implementation.java, but it gives me error about not finding that implementation...
My composite is : <composite xmlns="http://www.osoa.org/xmlns/sca/1.0" targetNamespace="http://test/helloworld2" xmlns:p="http://asm" name="helloworld2"> <component name="HelloWorldRefComponent"> <service name="HelloWorldRefService"> <interface.java interface="helloworld.HelloWorldService"/> </service> <reference name="salutoService"/> <p:implementation.asm location="HelloWorldRefServiceComponent.asm"/> </component> <component name="SalutoComponent"> <service name="SalutoService"> <interface.java interface="helloworld.SalutoService"/> </service> <implementation.java class="helloworld.SalutoServiceImpl"/> </component> <wire source="HelloWorldRefComponent/salutoService" target="SalutoComponent/SalutoService"/> </composite> and the error is : AVVERTENZA: Inesistent implementation (something like that, in italian :) ): Component = SalutoComponent 22-ott-2010 17.38.21 org.apache.tuscany.sca.assembly.builder.impl.CompositeBindingURIBuilderImpl Any ideas? Thank you very much! 2010/10/19 Simon Nash <[email protected]> > Fabio Albani wrote: > >> Hi to all, >> >> I needed that because I'm developing an implementation for Asmeta >> language, a language for describing Abstract State Machines. In order to >> call methods, with ASM rules, in the way I've developed for my master degree >> work, and not the Tuscany's one, I couldn't use the usual way for resolving >> models... Now, using an ArtifactProcessor also on the composite, like in the >> "AnyElement" class file, I can call, in an ASM-like way, method on an ASM >> agent generated on-the-fly which is a wrapper for any kind of service. >> >> Only a question... how can I get the return value from a service knowing >> only parameters and name of the service (and of the component exposing it) ? >> >> I think you mean the return value of a service operation. > > 1. From the component, get the list of services. > 2. From the list of services, get the service (by name matching). > 3. From the service, get the InterfaceContract. > 4. From the InterfaceContract, get the Interface. > 5. Now you need to determine what type of interface it is (e.g., a > JavaInterface), and use language-specific code to introspect the > interface to get the names, parameters, and return type of each > of its operations. Each interface type has a different way of > doing this. > > Simon > > Thanks for your help :) >> >> Fabio >> >> 2010/10/16 Luciano Resende <[email protected] <mailto: >> [email protected]>> >> >> >> On Fri, Oct 15, 2010 at 2:01 AM, Fabio Albani >> <[email protected] <mailto:[email protected]>> wrote: >> > Hi to all, >> > I noticed I've already done that, but I can't manage how to use >> > CompositeProcessor in order to use thw whole composite... is it >> possibile to >> > get ALL the xml of the current composite in use in the extension? >> > The problem is that I haven't interface defined and so I use a >> custom way to >> > call other services from the reference, but I need to read >> attributes like >> > references, target etc. >> > Thank you! >> > >> >> Maybe you are trying to do things on the different phase ? In the read >> phase, we only delegate to processors that know how to read pieces of >> the composite and generate models, we then have a resolve phase where >> these models get resolved. Later on, your extension will be >> initialized and you will have access to the further runtime artifacts >> (see BindingProviderFactory ServiceBindingProviders, >> ReferenceBindingProviders) and then the actual invokers or >> servletListeners will also be able to play a part during the >> invocation. Maybe what you are trying to do fits better to a different >> phase or actually during the start or invocation process ? >> >> >> -- >> Luciano Resende >> http://people.apache.org/~lresende >> http://twitter.com/lresende1975 >> http://lresende.blogspot.com/ >> >> >> >
