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.