Page 1 of 1
DC_Xml2ObjectTree
Posted: Tue Apr 09, 2019 9:02 am
by Wolfgang Ciriack
Hi Roger,
with that code, sometimes i get the above error:
Code: Select all
oHttp := xbHTTPClient():new()
oResponse:=oHttp:Execute(script,"POST","xml="+xbEscape(cXmlStr))
if oResponse == NIL
cRet:="Kommunikations-HTTP-Fehler !"
else
cRet:=oResponse:Content
oR:=DC_Xml2ObjectTree( cRet )
How can i prevent this error ? (I use XBase 1.9.355, eXPress 266, Xb2net 3.6.05)

- error1.png (76.64 KiB) Viewed 7745 times
Re: DC_Xml2ObjectTree
Posted: Tue Apr 09, 2019 9:53 am
by rdonnay
The problem is with the XML that is returned in the response.
You need to write that XML to a file before calling DC_Xml2ObjectTree() so it can be investigated.
cRet:=oResponse:Content
MemoWrit('Response.Xml',cRet)
oR:=DC_Xml2ObjectTree( cRet )
DC_Xml2ObjectTree() uses the Alaska XML parser.
That is where the IDSC is occurring.
The next time you get an IDSC error, send me the XML so I can see if I can reproduce the error.
Re: DC_Xml2ObjectTree
Posted: Tue Apr 09, 2019 12:52 pm
by Wolfgang Ciriack
Ok, thank you Roger, i will try to catch one, it is difficult, because i have seen this error only 4 or 5 times in the last 3 month at 3 of 16 customers.
Re: DC_Xml2ObjectTree
Posted: Tue Apr 09, 2019 2:10 pm
by rdonnay
You will need to inform your customers to save away the Response.xml file immediately after the runtime error, otherwise it will get overwritten by the next XML request.