note 102442 rejected from simplexml.examples-basic by thiago

[email protected] Mon, 14 Feb 2011 10:48:59 -0800
Newsgroups php.notes
Message-ID <[email protected]>
Note Submitter: zola at zolaweb dot com 

----

If you're trying to use this with the SOAP client, there is apparently an issue with tags such as <soap:envelope> and <soap:body>, it does not like the colons.

If this is just a quick grab of a short soap response, a very simple workaround is to replace the offending tag:

/* Get the soap response */
$get_soap = $client->__doRequest (your variables here);

/* Replace "soap:" with plain "soap" */
$get_soap = str_ireplace('soap:', 'soap', $get_soap);

$xml = simplexml_load_string($get_soap);

now the object gets properly created.