Hi, I have a REST-service and the procedure needs to recieve two longchars. So INPUT PARAMETER lc1 AS LONGCHAR and INPUT PARAMETER lc2 AS LONGCHAR. But it gives me an error (internal server error 500 - postman). If I just use 1 longchar then that's ok. Is it possible to have two or more longchars as input parameter ? And if so, how can that be achieved ? Regards, Bart
Base64 encode is used for binary data but what will be the reason to encode a string?
Mind sharing the payload you send, details about mapping in the REST resource and maybe an error message that comes with your 500 error (either returned to Postman or from the AppServer logfile)?
Hi Mike,
What I send through Postman:
{
"request": {
"authToken": "aaabbbccc",
"dossierNr": 1,
"jsontttable1":
[
{
"srchfield": "naam1",
"srchstring": "abc"
}
],
"jsontttable2":
[
{
"srchfield": "naam2",
"srchstring": "def"
}
]
}
}
Nothing in the AppServer Log.
Error in Postman is '500 Internal Server error'.
I can't find anything in the Logs of Tomcat.
Bart
Longchars should normally be base64 encoded in the request body
{
"request": {
"Longchar1": BASE64ENCODED-VALUE,
"Longchar2": BASE64ENCODED-VALUE
}
}
Base64 encode is used for binary data but what will be the reason to encode a string?
It is years since we stopped working with the mapped/annotated rest and moved to WebHandler for REST
But when we did I remember we had to encode to get it to work!
Maybe because our longchars had json text,
Thanks for all the suggestions !
I tryed encoding but that wasn't any luck. Finally I just builded a complete new procedure and War file, with encoding, and now it works. Why ? I really don't know. It looks like my War-file was corrupted or so … I have no idea. But now it works !
Thanks !