Page 1 of 1

weird JSON problem.

Posted: Fri Nov 15, 2019 7:11 am
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

Re: weird JSON problem.

Posted: Mon Nov 18, 2019 10:50 pm
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 3387 times
/klaus