You can translate the question and the replies:

Rest Webservice Failling

Hi, I am using the sample stored procedureCalculateAvgRevenue .I created a rest webservice. Below GET works http://localhost:9090/server/tutorial/p_getrev/views/p_getrev?taxid_list={ ROW( '1') } But POST with X-HTTP-Method-Override is throwing error **The value of the parameter 'taxid_list' is not valid.** JSON Request: { "taxid_list": [ { "taxid": "1" } ]} Can you please help.
user
08-12-2020 02:22:34 -0500

2 Answers

Hi, This error may occur when there is a mismatch in the datatype of the provided value for the field. Hence, you could check the parameter value you have specified for taxid_list in the body of the request. To get detailed information about the error you are experiencing, please check the **vdp.log** which will be available under **<DENODO_HOME>/logs/vdp** folder. Also, the **X-HTTP-Method-Override** header allows applications to “tunnel” other HTTP methods inside POST requests. You can tunnel the following methods inside a POST request: GET, PUT and DELETE. You can put an XML document, a JSON, or an HTML form in the body, and the request has to have the header** Content-Type**. Hence, please ensure whether you have included the header Content-Type. To [send the input parameters in the body of the request, in a JSON document](https://community.denodo.com/docs/html/browse/latest/vdp/administration/restful_architecture/restful_web_service/input_parameters_of_the_restful_web_service#tunnel-http-methods-inside-another-http-method-x-http-method-override#:~:text=Sending%20Input%20Parameters%20in%20a%20JSON%20Document), add the HTTP header **Content-Type: application/json**. You could refer to the section [Tunnel HTTP Methods Inside Another HTTP Method (X-HTTP-Method-Override)](https://community.denodo.com/docs/html/browse/latest/vdp/administration/restful_architecture/restful_web_service/input_parameters_of_the_restful_web_service#tunnel-http-methods-inside-another-http-method-x-http-method-override) of Virtual DataPort Administration Guide for more information. Hope this helps!!
Denodo Team
11-12-2020 00:59:47 -0500
Thank you for your feedback. I have follwed as in document you described. POST with below request works JSON Request { "$filter":"taxid_list={ ROW( '1') }"} but with below request it doesnt work JSON Request: { “taxid_list”: [ { “taxid”: “1” } ]} Thank You Thank You
user
05-01-2021 21:52:07 -0500
You must sign in to add an answer. If you do not have an account, you can register here