I am using a simple rSocket server to handle the client request. Using RSC cli to send Client request.
java -jar rsc.jar --debug --request --data "{\"message\":\"HiSourav\"}" --route request-response tcp://localhost:7000
Above is the command i am using to send the request and getting the below mentioned error.
Error: Could not resolve method parameter at index 0 in reactor.core.publisher.Mono<com.example.RsocketTestWithClient.entity.Message> com.example.RsocketTestWithClient.RsocketTestWithClientApplication.requestResponse(com.example.RsocketTestWithClient.entity.Message): Failed to read HTTP message; nested exception is org.springframework.core.codec.DecodingException: JSON decoding error: Unexpected character ('m' (code 109)): was expecting double-quote to start field name; nested exception is com.fasterxml.jackson.core.JsonParseException: Unexpected character ('m' (code 109)): was expecting double-quote to start field name
at [Source: (io.netty.buffer.ByteBufInputStream); line: 1, column: 3]
Let me know any suggestions you have.
Your error suggests a problem in the client,
Unexpected character ('m' (code 109)): was expecting double-quote to start field name at [Source: (io.netty.buffer.ByteBufInputStream); line: 1, column: 3]
So I'd try to confirm you are sending the right content.
Use the --debug (or --wiretap) output to confirm that the data is correctly sent by the client. If you have done that e.g.
$ rsc --request --data "{\"message\":\"HiSourav\"}" --debug tcp://localhost:9000
2020-12-28 08:52:52.158 DEBUG --- [ parallel-2] i.r.FrameLogger : sending ->
Frame => Stream ID: 1 Type: REQUEST_RESPONSE Flags: 0b100000000 Length: 31
Metadata:
Data:
+-------------------------------------------------+
| 0 1 2 3 4 5 6 7 8 9 a b c d e f |
+--------+-------------------------------------------------+----------------+
|00000000| 7b 22 6d 65 73 73 61 67 65 22 3a 22 48 69 53 6f |{"message":"HiSo|
|00000010| 75 72 61 76 22 7d |urav"} |
+--------+-------------------------------------------------+----------------+
2020-12-28 08:52:52.448 DEBUG --- [actor-tcp-nio-1] i.r.FrameLogger : receiving ->
Frame => Stream ID: 1 Type: ERROR Flags: 0b0 Length: 102
Data:
Error: Destination '' does not support REQUEST_RESPONSE. Supported interaction(s): [REQUEST_STREAM]
Use --stacktrace option for details.
Then you can confirm it's a server problem and you should debug why the server is breaking here.