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 .