weird JSON problem.

This Q&A forum allows users to post and respond to "How Do I Do ....." questions. Please do not use to report (suspected) errors - you must use your regional help desk for this. The information contained in this forum has not been validated by LANSA and, as such, LANSA cannot guarantee the accuracy of the information.
Post Reply
kno_dk
Posts: 221
Joined: Tue Feb 23, 2016 12:00 am

weird JSON problem.

Post by kno_dk »

Hi.

I have 3 wam which deliver som JSON in the response. I have tested the 3 wam's in POSTMAN (tool) and they works as expected on our development server (IBM I ) and when installed on the customers server (IBM I).

I have then created a Server module on my development pc which integrate with these 3 wam's. I have also creaded a VL-WEB page which use the server modul. When I am running the VL-WEB page (and server module) on my pc and the server module call to our development server (IBM I) they all works okay.
But if I change the server module to use our customers IBM I, I get the correct JSON from all 3 wam's (I have set up the dummp of the json like this: https://docs.lansa.com/14/en/lansa018/c ... 1_0395.htm) but when the Server Module is going to unpack the JSON string to get me the value in my RDMLX fields only 1 of the 3 JSON works. And it is always the same one which is working.

I have debuged the server modules and HttpRequest.Response.IsSuccessfulRequest and HttpRequest.Response.IsSuccessHttpStatusCode is Okay.

Here is the JSON answer from our server (which works):
{
"statuscode":"000000",
"statustext":"",
"catalog_list": [
{
"catalog_number": "1",
"catalog_text": "KatalogÆØÅæøå{[]}"
} ,
{
"catalog_number": "2",
"catalog_text": "Universal"
} ,
{
"catalog_number": "84",
"catalog_text": "Beckman"
}
]
}

And here from the customers server (which is not working):
{
"statuscode":"000000",
"statustext":"",
"catalog_list": [
{
"catalog_number": "15",
"catalog_text": "Kjemi, Smøremidler"
} ,
{
"catalog_number": "19",
"catalog_text": "Marine (NY)"
}
]
}
Does anybody have a hint og suggestion how to solve the problem?

/Klaus
kno_dk
Posts: 221
Joined: Tue Feb 23, 2016 12:00 am

Re: weird JSON problem.

Post by kno_dk »

Hi.

I found the reason of the problem.

It was the ccsid settings of the Http-server (see table below). I can get it to work, but I will not have any € sign in the JSON response
Udklip.PNG
Udklip.PNG (10.79 KiB) Viewed 3386 times
/klaus
Post Reply