Created
September 19, 2012 15:00
-
-
Save reeze/3750131 to your computer and use it in GitHub Desktop.
Soapclient-test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$client = new SoapClient('http://www.webservicex.net/whois.asmx?WSDL'); | |
$method = 'GetWhoIS'; | |
$args = array('HostName' => 'reeze.cn'); | |
var_dump($client->GetWhoIS(array('HostName' => 'reeze.cn'))); | |
var_dump(call_user_func(array($client, $method), $args)); | |
$reflectionMethod = new ReflectionMethod($client , $method); | |
var_dump($reflectionMethod->invokeArgs($client , $args)); |
Result:
object(stdClass)#2 (1) {
["GetWhoISResult"]=>
string(398) "Domain Name: reeze.cn
ROID: 20090705s10001s87709460-cn
Domain Status: ok
Registrant ID: c-x-57536-12951
Registrant: ?????????
Registrant Contact Email: reeze.xia@gmail.com
Sponsoring Registrar: ??????????????????????????????????????????
Name Server: namerich1.dnspod.net
Name Server: namerich2.dnspod.net
Registration Date: 2009-07-05 15:59:55
Expiration Date: 2015-07-05 15:59:55
DNSSEC: unsigned
"
}
object(stdClass)#2 (1) {
["GetWhoISResult"]=>
string(398) "Domain Name: reeze.cn
ROID: 20090705s10001s87709460-cn
Domain Status: ok
Registrant ID: c-x-57536-12951
Registrant: ?????????
Registrant Contact Email: reeze.xia@gmail.com
Sponsoring Registrar: ??????????????????????????????????????????
Name Server: namerich1.dnspod.net
Name Server: namerich2.dnspod.net
Registration Date: 2009-07-05 15:59:55
Expiration Date: 2015-07-05 15:59:55
DNSSEC: unsigned
"
}
PHP Fatal error: Uncaught exception 'ReflectionException' with message 'Method SoapClient::GetWhoIS() does not exist' in /Users/reeze/Opensource/php-test/php-src-5.3/a.php:11
Stack trace:
#0 /Users/reeze/Opensource/php-test/php-src-5.3/a.php(11): ReflectionMethod->__construct(Object(SoapClient), 'GetWhoIS')
#1 {main}
thrown in /Users/reeze/Opensource/php-test/php-src-5.3/a.php on line 11
Fatal error: Uncaught exception 'ReflectionException' with message 'Method SoapClient::GetWhoIS() does not exist' in /Users/reeze/Opensource/php-test/php-src-5.3/a.php:11
Stack trace:
#0 /Users/reeze/Opensource/php-test/php-src-5.3/a.php(11): ReflectionMethod->__construct(Object(SoapClient), 'GetWhoIS')
#1 {main}
thrown in /Users/reeze/Opensource/php-test/php-src-5.3/a.php on line 11
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Service from: http://www.webservicex.net/WS/WSDetails.aspx?WSID=52&CATID=12