SOAP-ERROR: Parsing WSDL: Couldn't load from 'URI' : Extra content at the end of the document
chris (2009-11-10 23:48:32)
This error kept coming up when trying to read the WSDL for a soap service which I was trying to consume - actually when writing some Betfair client classes. The WSDL was definitely valid and well formed and there wasn't any training newline, or superfluous whitespace that I could detect. I thought the issue might have been with the HTTP headers being passed up in the response, but they all appear to be intact.
Digging a bit deeper, it turned out to be a bug in PHP itself (
php bug 48216). The 'Stream wrappers' within PHP were polluting the consumed file stream with superfluous characters. I have retested against a php-HEAD build this evening, and the issue appears to be resolved.
Now awaiting the next point release of PHP so that this can go to production.
christo