@Override
public NormalizedNodeContext invokeRpc(final String identifier, final NormalizedNodeContext payload,
final UriInfo uriInfo) {
+ if (payload == null) {
+ // no payload specified, reroute this to no payload invokeRpc implementation
+ return invokeRpc(identifier, "", uriInfo);
+ }
+
final SchemaPath type = payload.getInstanceIdentifierContext().getSchemaNode().getPath();
final URI namespace = payload.getInstanceIdentifierContext().getSchemaNode().getQName().getNamespace();
final ListenableFuture<DOMRpcResult> response;
}
if (!rpc.getInput().getChildNodes().isEmpty()) {
- LOG.debug("RPC {} does not need input value.", rpc);
- throw new RestconfDocumentedException("RPC " + rpc + " does not take any input value.",
- ErrorType.RPC, ErrorTag.INVALID_VALUE);
+ LOG.debug("No input specified for RPC {} with an input section", rpc);
+ throw new RestconfDocumentedException("No input specified for RPC " + rpc
+ + " with an input section defined", ErrorType.RPC, ErrorTag.MISSING_ELEMENT);
}
final ListenableFuture<DOMRpcResult> response;