- protected Future<RpcResult<CompositeNode>> invokeRpcUnchecked( CompositeNode rpcRequest ) {
- return mountPoint.rpc( getRpcDefinition().getQName(), rpcRequest );
+ protected Future<RpcResult<CompositeNode>> invokeRpcUnchecked(CompositeNode rpcRequest) {
+ Optional<RpcProvisionRegistry> service = mountPoint.getService(RpcProvisionRegistry.class);
+ if (service.isPresent()) {
+ return service.get().invokeRpc(getRpcDefinition().getQName(), rpcRequest);
+ }
+ throw new RestconfDocumentedException("Rpc service is missing.");