@ 2015-10-12T14:03:28Z <?php
// Create Security header
$secns = "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd";
$token = new stdClass;
$token->Username = new SOAPVar('bugs_php_net_test', XSD_STRING, null, null, null, $secns);
$token->Password = new SOAPVar('bugs_php_net_test', XSD_STRING, null, null, null, $secns);
$wsec = new stdClass;
$wsec->UsernameToken = new SoapVar($token, SOAP_ENC_OBJECT, null, null, null, $secns);
$headers = new SOAPHeader($secns, 'Security', $wsec, true);
// Go go go
$client = new SoapClient("http://www.webservicex.net/periodictable.asmx?WSDL", array('exceptions' => true, 'trace' => 1));
$client->__setSOAPHeaders($headers);
$client->GetAtomicNumber(array('ElementName' => 'Vanadium'));
Enable javascript to submit You have javascript disabled. You will not be able to edit any code.
Output for 8.0.0 - 8.0.30 , 8.1.0 - 8.1.27 , 8.2.0 - 8.2.17 , 8.3.0 - 8.3.4 Fatal error: Uncaught Error: Class "SOAPVar" not found in /in/ZjmWA:5
Stack trace:
#0 {main}
thrown in /in/ZjmWA on line 5
Process exited with code 255 . Output for 7.0.0 - 7.0.20 , 7.1.0 - 7.1.20 , 7.2.0 - 7.2.33 , 7.3.16 - 7.3.33 , 7.4.0 - 7.4.33 Fatal error: Uncaught Error: Class 'SOAPVar' not found in /in/ZjmWA:5
Stack trace:
#0 {main}
thrown in /in/ZjmWA on line 5
Process exited with code 255 . Output for 5.4.1 - 5.4.45 , 5.5.24 - 5.5.35 , 5.6.8 - 5.6.28 Fatal error: Class 'SOAPVar' not found in /in/ZjmWA on line 5
Process exited with code 255 . preferences:dark mode live preview
192.94 ms | 402 KiB | 223 Q