I am following the instructions here to write an simple hello world RPC: https://docs.opendaylight.org/en/stable-sodium/developer-guide/developing-apps-on-the-opendaylight-controller.html
In the example HelloProvider class, the constructor is:
public HelloProvider(final DataBroker dataBroker, final RpcProviderService rpcProviderService) {
this.dataBroker = dataBroker;
this.rpcProviderService = rpcProviderService;
}
which requires a RpcProviderService, therefore the compilation fails. So I added to impl/src/main/resources/OSGI-INF/blueprint/impl-blueprint.xml:
<reference id="rpcProviderService"
interface="org.opendaylight.mdsal.binding.api.RpcProviderService"/>
odl:type="default" />
That leads to the project compiling, but fails at the test phase:
Missing dependencies:
(objectClass=org.opendaylight.controller.md.sal.dom.api.DOMNotificationPublishService)
(objectClass=org.opendaylight.controller.md.sal.dom.api.DOMDataBroker)
(objectClass=org.opendaylight.controller.md.sal.dom.spi.DOMNotificationSubscriptionListenerRegistry)
(objectClass=org.opendaylight.controller.md.sal.dom.api.DOMMountPointService)
(objectClass=org.opendaylight.controller.md.sal.dom.api.DOMRpcService)
(objectClass=org.opendaylight.controller.md.sal.dom.api.DOMNotificationService)
(objectClass=org.opendaylight.controller.md.sal.dom.api.DOMDataBroker)
(objectClass=org.opendaylight.controller.md.sal.dom.api.DOMRpcProviderService)
The org.opendaylight.controller package is already pulled in, so perhaps I am missing something else. Any advice?