The @target is pointing to a wrong componentName/serviceName. It should be 
"Prueba" instead of "PruebaComponent" as the component name is "Prueba".


From: Santiago Miguel Aranda Rojas 
Sent: Tuesday, June 09, 2009 1:28 PM
To: [email protected] 
Subject: Re: Problem with "implementation.osgi" reference


Tuscany 2.02M. The last version I think. April 2009
  ----- Original Message ----- 
  From: Raymond Feng 
  To: [email protected] 
  Sent: Tuesday, June 09, 2009 7:12 PM
  Subject: Re: Problem with "implementation.osgi" reference


  Are you using Tuscany/SCA 2.x or 1.x?


  From: [email protected] 
  Sent: Tuesday, June 09, 2009 9:15 AM
  To: [email protected] 
  Subject: Problem with "implementation.osgi" reference



  Hello 

  I want to use an osgi service as a SCA component. But I can not access to 
their methods from other Component.  I mean I have created a wired instance to 
the Osgi Service ($Proxy25). It is not "null" but I can not invoke to one 
method because an error is happening  

  --->Unable to create SCA binding invoker for local target 
SensorNetworkManagementComponent reference prueba (bindingURI=null 
operation=sayHello) 

  This is my composite file. I want to have to two components. The first had a 
reference to the second and it is normal "implementation.java". The second is 
the SCA component that is representing to the Osgi Service that I want to 
recover. This Osgi Service was registered in the Osgi registry by Activator 
class in "RegistroService" bundle. 

   <sca:component name="SensorNetworkManagementComponent"> 
      <sca:implementation.java 
class="es.amivital.sensornetworkmanagement.sca.SensorNetworkManagementServiceImpl"/>
 
      <sca:service name="SensorNetworkManagementService">       
       <sca:binding.ws 
uri="http://localhost:8085/SensorNetworkManagementComponent"/> 
     </sca:service> 
    <sca:reference name="prueba" target="PruebaComponent"/> 
    </sca:component> 


    <sca:component name="Prueba"> 
          <sca:implementation.osgi 
xmlns="http://tuscany.apache.org/xmlns/sca/1.0"; 
               bundleSymbolicName="RegistroService"                          
               bundleVersion="1.0.0"> 
              <sca:properties service="prueba.PruebaImpl">                 
              </sca:properties> 
          </sca:implementation.osgi> 
  </sca:component> 

  ***The Java code--> The first component. 

  public class SensorNetworkManagementServiceImpl  implements 
SensorNetworkManagementService { 
  private Prueba prueba; 
  public Prueba getPrueba() { 
  return prueba; 
  } 
  @Reference 
  public void setPrueba(Prueba prueba) { 
  this.prueba = prueba; 
  } 
  } 

  **Java code       --> The second component. It is another bundle that is 
registering one simple Osgi Service. The interface was 

  public interface Prueba { 
  public abstract String sayHello(); 

  } 





  This instance (prueba) is not null when an outside client invoke to the first 
component. But if I invoke to one method of this interface, for example 
"prueba.sayHello" I obtained the previous error. 

  I have read something about anottations like @AllowsPassByReference or 
@Scope, but I don“t know if they are neccesary . 

Reply via email to