Hi,
I'm trying to create two Rest webservice methods, one "post" method using json in input, one "get" method getting a json in output.
I did follow the webservice tutorial with XML in output and it works perfectly but I couldn't do the same with Json.
I have a very simple json format :
{
"personne" :
{
"id" : 1,
"firstname" : "jean",
"lastname" : "durand",
"company" : "ysance"
}
}
(attachment : json_metadata.PNG)
1.
post Method : load the json entry into a temporary table (attachment : json_post.PNG)
-> Nothing happened -> Error message in XML
2.
get Method: get data from the temporary table and retun them in json format (attachment : json_get.PNG)
-> I get the following error :
javax.xml.ws.WebServiceException: java.lang.RuntimeException: [was class com.ctc.wstx.exc.WstxUnexpectedCharException] Unexpected character '{' (code 123) in prolog; expected '<'
Am I missing something?