-
Notifications
You must be signed in to change notification settings - Fork 347
msf4j @RequestBody not working #553
Description
I am trying to write a post request and i am calling this request from angular 5 client
@OPTIONS
@POST
@Path("/post")
@Consumes("application/json")
@Produces("application/json")
public String addStock(@RequestBody JsonObject stock)
{
return "test";
}
But everytime i call this request from angular i get this error
2018-11-27 18:36:09 WARN MSF4JHttpConnectorListener:243 - Unmapped exception
java.lang.IllegalArgumentException: argument type mismatch
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.wso2.msf4j.internal.router.HttpMethodInfo.invokeResource(HttpMethodInfo.java:187)
at org.wso2.msf4j.internal.router.HttpMethodInfo.invoke(HttpMethodInfo.java:143)
at rg.wso2.msf4j.internal.MSF4JHttpConnectorListener.dispatchMethod(MSF4JHttpConnectorListener.java:218)
at org.wso2.msf4j.internal.MSF4JHttpConnectorListener.lambda$onMessage$39(MSF4JHttpConnectorListener.java:129)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Can anybody suggest on how to implement