I\'m using NUSOAP to use a soap interface to microsoftdynamics. I\'m getting this error \"wsdl error: Getting https://testserver2013.api.crm4.dynamics.com/XRMServices/2011/Organ
I just saw this error and it appears to be a bug in the nusoap code. In our case this was caused by a 401 error response to the SOAP call but 301 and 302 responses would appear to trigger the same issue.
The bug appears to be in the following line of code:
if ($pos = strpos($data,"\r\n\r\n"))
When headers were stripped $pos is set to 0 and this evaluates to FALSE whereas it appears the developer intended it to evaluate to TRUE along with the case where the headers are intact.
See: https://github.com/codecasts/nusoap-php7/blob/master/lib/class.soap_transport_http.php