Hi All,
Our aveksa Version: 6.9.1.127678 P22
We are using REST api POST method to create new user in MongoDB application which support JSON.
We are able to create/update user but having issue in getting response from the application in AFX. We are getting proper response while testing with RESTClient but in AFX it is giving below error messages when we configure different Content-Type and Accept values:
Request Headers | |||
Content-Type | Accept | Error | |
1 | application/json;charset=UTF-8 | application/json;charset=UTF-8 | Error code = 2 Failure - Error processing RESTful web service response Cause: Error processing RESTful web service response: java.lang.IllegalStateException: Expected application/json but received application/json;charset=UTF-8 |
2 | application/json | application/json;charset=UTF-8 | Error code = -1 javax.script.ScriptException: java.lang.NumberFormatException: null Cause: Stack Trace: org.mule.component.AbstractComponent.invokeInternal(AbstractComponent.java:148) |
3 | application/json;charset=UTF-8 | application/json | Error code = 2 Failure - Error processing RESTful web service response Cause: Error processing RESTful web service response: java.lang.IllegalStateException: Expected application/json but received application/json;charset=UTF-8 |
Please let me know if there is any configuration changes required.
Thanks
Yogesh Mishra
Hi All,
I got a solution for this. I changed Content-Type to application/json
and Accept-Encoding to charset=UTF-8 instead of Accept and it worked.
Regards
Yogesh Mishra