Advertisement
Guest User

Untitled

a guest
Jan 16th, 2017
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.84 KB | None | 0 0
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://localhost:8000/soap/index.php?wsdl" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
  3. <SOAP-ENV:Body>
  4. <ns1:testMethod>
  5. <return xsi:type="xsd:boolean">true</return>
  6. </ns1:testMethod>
  7. </SOAP-ENV:Body>
  8. </SOAP-ENV:Envelope>
  9.  
  10. $xml = simplexml_load_string($res, NULL, NULL, "http://schemas.xmlsoap.org/soap/envelope/");
  11. $ns = $xml->getNamespaces(true);
  12. $soap = $xml->children($ns['SOAP-ENV']);
  13. $res = $soap->Body->children($ns['ns1']);
  14.  
  15. foreach ($res->LookupResponse as $item) {
  16. echo $item->result.PHP_EOL;
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement