[Progress Communities] [Progress OpenEdge ABL] Forum Post: Problem testing a POST call in a CRUD

  • Thread starter Thread starter untipet
  • Start date Start date
Status
Not open for further replies.
U

untipet

Guest
We are trying to implement a simple CRUD for some tables in our system based in Progress. We are trying to use json objects to interact with the system, and the methods that interacts with the database is expecting datasets as the structure to get or put data into the db. We have defined a Rest service for all the operations. Now we have the get method implemented to get all the elements or just the result of a filter and is working fine. for example: For the url filtering the ítem with id = 1 we get this response: { "dsTableName": { "prods:hasChanges":true, "ttTableName":[{ "id":"1", "field1":"value1", "field2":"value2", "field3":"value3"}], "prods:before":{} } } But we are having some problems with the post method to put a row into the db. We try to call to the url and pass a json object with the same values than the showed above without the prods:before line. We expected that the system will throw an error because the id 1 is already taken, but we allways get the error "JSON value of ProDataset or temp-table parameter is invalid or empty.". So the json we are passing is wrong, but we don't know where the error is. Ths json we are passing looks like this: { "dsTableName": { "prods:hasChanges":true, "ttTableName":[{ "id":"1", "field1":"value1", "field2":"value2", "field3":"value3" } } Any idea? Thanks in advance.

Continue reading...
 
Status
Not open for further replies.
Back
Top