Details
-
Bug
-
Status: Resolved
-
Resolution: Done
-
None
-
None
-
None
-
Operating System: All
Platform: All
-
2233
Description
Working with RPCs defined in the yang I got tis exception:
2014-10-19 16:36:43.877 CEST [config-pusher] ERROR o.o.c.s.b.i.RpcProviderRegistryImpl - Unhandled exception during invoking listener {}
java.util.NoSuchElementException: null
<< FIND ATTACHED THE FULL STACK TRACE >>
After some tests I discovered that the exception is thrown when defining a RPC without an input. Output is optional and everything works well if there isn't an output declared.
Let me show you some examples:
rpc nothing { } DOESN'T WORK
rpc only-output { output { leaf foo
} } DOESN'T WORK
rpc empty-input { input { } } WORKS
Notice that input doesn't have to contain anything. When calling this RPC from java, just use the input builder for building an empty input object. When calling it from RESTconf, just post { input: { } }.