wsdl error: XML error parsing WSDL from https://sna.etapestry.com/v2messaging/service?WSDL on line 1: Not well-formed (invalid token)
Playing around with outputting the
$this->debug variable (unittesting + NuSOAP is making my life sad) revealed that headers weren’t being removed from the WSDL response, and so the XML wasn’t valid. I verified that by adding my own debug statement around line 3184 of nusoap.php to see how many headers it found.
$this->debug('Header array size: ' . count($header_array));
It was finding 1 header, which wasn’t correct, because this was what my headers looked like:
HTTP/1.1 200 Connection established
HTTP/1.1 200 OK
Date: Fri, 26 Aug 2011 15:53:36 GMT
The issue was in the isSkippableCurlHeader() call about 40 lines up. That function (declared around line 2762 of nusoap.php) lists HTTP headers that can be ignored, but is missing “HTTP/1.1 200 Connection established”. It only has “HTTP/1.0 200 Connection established”.
Add “HTTP/1.1 200 Connection established” to the
$skipHeaders array, and you’re set.
…And don’t redownload the NuSOAP library and overwrite your changes.