Hi,
I have defined two REST methods, GET and POST (See images attached).
GET it's working fine and response is OK. The problem is in POST because of web parameters. I'm using restClient for Firefox.
This is the wadl.
I'm trying to call service via POST method with the URL "http://{myIP}:8080/Project/rest/Producte/Producte", and in Body:
{pcNamProd:"ProductOne"}
This should be insert de "ProductOne" Product in database but I have this error.
- Status Code: 415 Unsupported Media Type
- Content-Length: 0
- Date: Tue, 21 May 2013 12:09:34 GMT
- Server: Apache-Coyote/1.1
Can anyone tell me what I'm doing wrong?
Tx!!
I'm running into the same problem, the "415, unsupported media type". Did you solve it somehow?
I get this when I want to test my REST service from PostMan, which is a Chrome app for HTTP calls.
Is the Content-Type header set correctly to application/json?
I thought the tool did, but apparently not. Setting the Content-Type header "manually" did he trick. Thanks!