Hi,
I'm having problems reading an array from a Web Service if there are spaces in the data.
For example:
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" xmlns:u="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"><s:Header><o:Security s:mustUnderstand="1" xmlns="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"><u:Timestamp u:Id="_0"><u:Created>2023-09-21T21:28:05.187Z</u:Created><u:Expires>2023-09-21T21:33:05.187Z</u:Expires></u:Timestamp></o:Security></s:Header><s:Body><QueueCortinaResponse xmlns="http://tempuri.org/"><QueueCortinaResult>{"error":"","Queue":[{"Test":"NoError"}]}</QueueCortinaResult></QueueCortinaResponse></s:Body></s:Envelope>
Works fine, but:
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" xmlns:u="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"><s:Header><o:Security s:mustUnderstand="1" xmlns="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"><u:Timestamp u:Id="_0"><u:Created>2023-09-21T21:28:44.032Z</u:Created><u:Expires>2023-09-21T21:33:44.032Z</u:Expires></u:Timestamp></o:Security></s:Header><s:Body><QueueCortinaResponse xmlns="http://tempuri.org/"><QueueCortinaResult>{"error":"","Queue":[{"Test":"With Error"}]}</QueueCortinaResult></QueueCortinaResponse></s:Body></s:Envelope>
throws
org.json.JSONException: Unterminated object at character 13 of [{Test=With Error}]
Thanks in advance
I'm having problems reading an array from a Web Service if there are spaces in the data.
B4X:
Dim parser As JSONParser
parser.Initialize(resultado.Get("Queue"))
CPQueueList = parser.NextArray
For example:
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" xmlns:u="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"><s:Header><o:Security s:mustUnderstand="1" xmlns="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"><u:Timestamp u:Id="_0"><u:Created>2023-09-21T21:28:05.187Z</u:Created><u:Expires>2023-09-21T21:33:05.187Z</u:Expires></u:Timestamp></o:Security></s:Header><s:Body><QueueCortinaResponse xmlns="http://tempuri.org/"><QueueCortinaResult>{"error":"","Queue":[{"Test":"NoError"}]}</QueueCortinaResult></QueueCortinaResponse></s:Body></s:Envelope>
Works fine, but:
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" xmlns:u="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"><s:Header><o:Security s:mustUnderstand="1" xmlns="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"><u:Timestamp u:Id="_0"><u:Created>2023-09-21T21:28:44.032Z</u:Created><u:Expires>2023-09-21T21:33:44.032Z</u:Expires></u:Timestamp></o:Security></s:Header><s:Body><QueueCortinaResponse xmlns="http://tempuri.org/"><QueueCortinaResult>{"error":"","Queue":[{"Test":"With Error"}]}</QueueCortinaResult></QueueCortinaResponse></s:Body></s:Envelope>
throws
org.json.JSONException: Unterminated object at character 13 of [{Test=With Error}]
Thanks in advance