Consommation d'un WebService qui retourne un DomDocument
Bonjour
J'utilise d'habitude ce code pour consommer un webservice qui retourne un XML sous format String; et ça marche .
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13
| <?php
$client = new SoapClient('http://localhost:1975/xxx/Service.asmx?wsdl');
$doc = new DOMDocument();
$doc->loadXML($client->Get_client(array('id_client'=>'xxx'))->Get_clientResult);
$books = $doc->getElementsByTagName('prenom');
foreach ($books as $book) {
echo $book->nodeValue, PHP_EOL;
}
?> |
maintenant je veux consommer un Webservice qui retourne un DomDocument et non pas un String?
(As System.Xml.XmlDocument)
Comment faire, je suis perdu