Hi Marina,
This is actually still the same issue that Victor is having. Let me explain. My results were even confusing me at first, but I think have a better grasp of what is happening.
It turns out the Client matters. The WSDL file response is very different depending on how I acquire it. The WSDL File I posted was obtained by initiating a RAW TCP Connection with the moodle server where I control the receiving of the data. I get a very different response (even with the same URL) if I use a browser. If I use a browser (ie. Safari, Chrome, or Firefox on Mac, and Firefox on Windows 7 Pro) the response.xml file has single right bracket character. That's all.
If you look at one of the Return headers (like the one I posted) you'll notice that the moodle server says:
Content Length: 1
Even though it is sending an entire WSDL xml file. I am not a web expert, but I am guessing that the browsers can't handle that. I did it with RAW TCP command and had more control of handling the response.
Return header:
HTTP/1.1 200 OK
Server: nginx/1.8.0
Date: Fri, 24 Jun 2016 21:15:47 GMT
Content-Type: application/xml; charset=utf-8
Content-Length: 1
Connection: keep-alive
Cache-Control: private, must-revalidate, pre-check=0, post-check=0, max-age=0
Expires: Thu, 01 Jan 1970 00:00:00 GMT
Pragma: no-cache
Accept-Ranges: none
Content-Disposition: inline; filename="response.xml"
Cache-Control: public
<?xml version="1.0"?>
<definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:t..... (I left out the rest of the response...)
Let me know if you think this makes sense.
dave