>Hi Michel,
>
>>So far, so good, from the client, to the Web Service, to the Web Server, back to the Web Service and back to the client, I can obtain my XML. However, I have lost the UTF-8 conversion. Anyone knows why?<
>
>I'd add the encoding method to the HTTP header:
>
>
>Content-Type: text/xml; charset=utf-8
>
>
>and in the XML declaration
>
>
><?xml version="1.0" encoding="utf-8" ?>
>
Well, what is extremely strange in this one is that if I have my Web app to only return the string as is, without any header and without any STRCONV() conversion, I end up at my Web Service level with the proper string. So, it goes like this:
loHTTP=CREATEOBJECT('MSXML2.ServerXMLHTTP')
loHTTP.Open('GET',lcUrl,.F.)
loHTTP.Send()
STRTOFILE(loHTTP.ResponseBody,'d:\a.xml')
RETURN loHTTP.ResponseBody
I can verify that by looking at d:\a.xml file and see that it is a proper recognized XML file. However, it doesn't contain the UTF-8 equivalent but at least that part is working.
However, once the client receive the same string, it's all corrupted or in another format that I can't understand. The goal is, as it was not working with the previous approach was to have the Web app to only return the content as is without any UTF-8 conversion. I would then rely on the WS to do it.
Based on what you say, if I go back to my initial approach by having the Web app to return the XML content in UTF-8, if I use the proper HTTP header with charset=utf-8, does this mean I no longer need to convert my XML string into UTF-8 or that is still needed?