Categories

PHP error on webservices: extra content at the end of the document

I was trying to test some webservices using PHP 5.3.0 as client.
Most of them were working properly, but One gave me the following error:

Uncaught SoapFault exception: [WSDL] SOAP-ERROR: Parsing WSDL: Couldn’t load from ‘http://thisistheUrlOfTheWsdl?wsdl’ : Extra content at the end of the document

After some investigations, I realised that this is probably a bug of PHP: I’ve found out that the webservice is working if I access it using PHP 5.2.10.

The solution I found is to create a local copy of the WSDL file (it’ll be something mywsdl.xml) and reference the local copy instead of the original wsdl url.

1 comment to PHP error on webservices: extra content at the end of the document

  • Alexx

    I have the same problem and since my server is hosted by a hosting company i cannot do much about the server settings….

    The thing is i have 3 SOAP connections that work fine but on the fourth one i’m getting the Extra content at the end of the document error. Have absolutely no ideea what to do… How do you “reference the local copy instead of the original wsdl url” and still get the restults you need from the WDSL’s methods ?

Leave a Reply

 

 

 

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Cyberactiva web development - Blogged