You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I tried to use JSON-RPC client today using proxy generation. CommandService commandService = rpc.onDemand(CommandService.class);
But I didn't have separate interface declaration, just service class with JSON-RPC annotations. I decided to try this class directly and got this error:
java.lang.IllegalStateException: Method 'wait' is not annotated as @JsonRpcMethod
at com.github.arteam.simplejsonrpc.client.builder.Reflections.getClassMetadata(Reflections.java:57)
at com.github.arteam.simplejsonrpc.client.builder.ObjectApiBuilder.<init>(ObjectApiBuilder.java:53)
at com.github.arteam.simplejsonrpc.client.JsonRpcClient.onDemand(JsonRpcClient.java:96)
...
Then I tried to extract interface with annotations and leave implementation class without annotations. I got Method not found error. Meta-information wasn't read from interface declaration.
Basically if I want to use proxy client generation I have to have my interface annotated and if I want framework to recognize implementation class' methods I need to keep annotations in place there. It means that JSON-RPC metadata is duplicated across interface and implementation.
It would be nice to be able to generate client proxy directly from annotated class, not just interface. Generator would search for annotated methods only and ignore all others.
What you think?
The text was updated successfully, but these errors were encountered:
I tried to use JSON-RPC client today using proxy generation.
CommandService commandService = rpc.onDemand(CommandService.class);
But I didn't have separate interface declaration, just service class with JSON-RPC annotations. I decided to try this class directly and got this error:
Then I tried to extract interface with annotations and leave implementation class without annotations. I got
Method not found
error. Meta-information wasn't read from interface declaration.Basically if I want to use proxy client generation I have to have my interface annotated and if I want framework to recognize implementation class' methods I need to keep annotations in place there. It means that JSON-RPC metadata is duplicated across interface and implementation.
It would be nice to be able to generate client proxy directly from annotated class, not just interface. Generator would search for annotated methods only and ignore all others.
What you think?
The text was updated successfully, but these errors were encountered: