Bonjour
J'utilise d'habitude ce code pour consommer un webservice qui retourne un XML sous format String; et ça marche .
maintenant je veux consommer un Webservice qui retourne un DomDocument et non pas un String?
Code : Sélectionner tout - Visualiser dans une fenêtre à part
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; } ?>
(As System.Xml.XmlDocument)
Comment faire, je suis perdu
Partager