Welcome! Log In Create A New Profile

Advanced

Error imported webservice

Posted by CMBthierry 
Error imported webservice
September 27, 2019 09:26AM
Hi ,
I’using an imported webservice in my program.
WS_in is WSInquiry
WS_out is WSInquiryResponse

WS_in.Parm1 = glo_param
WS_out = WSInquiry(WS_in)


The result I receive in WS_out is an xml, and everything works fine.
Except, from times to times the result I receive contains special character who cannot be converted into an xml structure. So, the WSInquiry(WS_in) gives following error :
Error while decoding the response from the Webservice:
The XML document has not been loaded.
System Error Details: Row 1, Column 1326: xmlParseCharRef: invalid xmlChar value 31


I agree with the error, but is there a possibility to intercept to response before converting into xml and replace the bad character ?
I know there are 2 possibilities but I they are as ultimate solution.
- Ask the provider of the webservice to replace the invalid characters before sending the reposone
- Do the webservice request manually, so I can get the response into a buffer, check for bad characters and then move this to an xml form.
But so I lose the facility of Windev of handling webservices, and have to rewrite my program.
Author:

Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: