I'm stumped by one single thing when using Msxml2.ServerXMLHTTP.4.0. I'm sending an XML-formatted text string to a foreign server and getting a response back (using Windows 2000 Server and IIS). The problem is, when they send any special characters in the response string, my application chokes.
For example, when the response string contains an umlaut (as in the second character used in the European spelling of the city "Dusseldorf"), what I seem to be getting when I look at the response string in my browser (by displaying the XML string enclosed in <xmp> and </xmp> tags is:
Where the umlaut (and several of the following characters seem to have been garbled into a "?<CR/LF>"
Below is the code I'm using to send my XML string and receive a response (I've inserted a blank line between each line, so make wrapping issues less confusing):
Before I get to that, though, let me specify that the foreign server's spec calls for POSTing the information to them (which explains the "send" statement below. Also, they only "expect" the simplest of XML formations, and return the same, without any declaration statement. So, for example here is an XML string they're prepared to accept:
...and their return strings are formatted in the same way (with the <XML> tag serving as the root element).
Here's my ASP code:
set xmlhttp = server.Createobject("Msxml2.ServerXMLHTTP.4.0")
xmlhttp.Open HTTP_POST, WDL_URL_PREFIX, false
mlhttp.setRequestHeader "Content-Type", "application/x-www-form-urlencoded"
xmlhttp.send "IN=" + Server.URLEncode(xmlstring)
Response.ContentType = "text/html"
GC_response = xmlhttp.responseText
Set xmlhttp = nothing
Set xmlDoc = Server.CreateObject("Msxml2.DOMDocument.4.0")
xmlDoc.async = False
Here's an example of the "XML" response I'm parsing, if you need this much detail:
So, what do I have to do to be able to handle it gracefully when one of their child nodes contains a special character like an umlaut?
Thanks for any help you can give,