Note that there are some explanatory texts on larger screens.

plurals
  1. POIE8 not displaying XML but giving a popup saying "Do you want to save this file?" Why?
    text
    copied!<p>I am testing a SOAP service that has a single operation that returns a string containing an XML document. My server and client are implemented in PHP.</p> <p>Here is the source for my client:</p> <pre><code>&lt;?php header('Content-Type: text/xml, charset=iso-8859-1'); header("Content-Disposition: inline"); try{ $sClient = new SoapClient('http://localhost/soap/test.wsdl'); $response = $sClient-&gt;getDocument(); echo($response); } catch(SoapFault $e){ var_dump($e); } ?&gt; </code></pre> <p>And this is the XML returned by the SOAP service and echoed by the client:</p> <pre><code>&lt;?xml version="1.0" encoding="iso-8859-1" ?&gt; &lt;root&gt; &lt;form formname="test"&gt; &lt;post postid="2000" userid="bbh" postdate="2011-09-14" posttime="11:03:32"&gt; &lt;item name="Item1" value="123" /&gt; &lt;item name="Item2" value="456" /&gt; &lt;/post&gt; &lt;/form&gt; &lt;/root&gt; </code></pre> <p>When I test the SOAP client in Firefox for mac, Firefox for Windows and Safari, the XML returned by the SOAP service is correctly displayed in these browsers. However, when I test it on IE7 (on Windows 2003 Server) I get a blank screen even though I see the XML if I do a view source on the page. When I test it on IE8 (on Windows 7), I get a popup box saying "Do you want to save this file or find a program online to load it?".</p> <p>Does anyone have any idea why the XML is not being displayed correctly in IE7 and IE8?</p> <p>UPDATE:</p> <p>Here are the HTTP headers which I got from Live HTTP headers in Firefox:</p> <pre><code>http://localhost/soap/testclient.php GET /soap/testclient.php HTTP/1.1 Host: localhost User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:5.0.1) Gecko/20100101 Firefox/5.0.1 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 Accept-Language: en-us,en;q=0.5 Accept-Encoding: gzip, deflate Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7 Connection: keep-alive Cookie: PHPSESSID=bo6dlobivah1iaeu6d53vt9s10 Cache-Control: max-age=0 HTTP/1.1 200 OK Connection: close Date: Wed, 14 Sep 2011 11:09:57 GMT Server: Microsoft-IIS/6.0 X-Powered-By: ASP.NET, PHP/5.2.1 Content-Type: text/xml, charset=iso-8859-1 </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload