In connection with this question: How to request a response from the XML-API SOAP?
I have this PHP script sending a request with required fields:
$client = new SoapClient('https://live.domainbox.net/?WSDL'); $params = array( 'AuthenticationParameters' => array( 'Reseller' => 'resellername', 'Username' => 'myusername', 'Password' => 'mypassword' ), 'CommandParameters' => array( 'DomainName' => 'mydomain.com', 'LaunchPhase' => 'GA' ) ); $result = $client->CheckDomainAvailability($params); print_r($result);
The following error message appears:
Fatal error: throw exception SoapFault: [soap: VersionMismatch]
Possible SOAP version mismatch: The envelope namespace http://schemas.xmlsoap.org/soap/envelope/ was unexpected.
Waiting for http://www.w3.org/2003/05/soap-envelope . at / home / nosa / public _html / dev / check-domain-availability.php: 20 Stack Next: # 0 / home / nosa / public _html / dev / check-domain-availability.php (20):
SoapClient → __ call ('CheckDomainAvai ...', Array) # 1 / home / nosa / public _html / dev / check-domain-availability.php (20): SoapClient-> CheckDomainAvailability (Array) # 2 {main} thrown in / home / nosa / public _html / dev / check-domain-availability.php on line 20
I uninstalled and recompiled apache to enable the latest version of SOAP available with WHM / cPanel.
My question is: How do I send the correct envelope namespace?
source share