Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
Hello
I need some help with soap client code
I am using PHP 5.2.4. I wrote a simple web service client to consume the google search wsdl. For some reason, the client is unable to connect the web service and obtain the wsdl file.
Here is my codeCode: Select all
<?php
$client = new SoapClient("http://api.google.com/GoogleSearch.wsdl");
var_dump($client->__getFunctions());
?>soap
Soap Client enabled
Soap Server enabled
Directive Local Value Master Value
soap.wsdl_cache 1 1
soap.wsdl_cache_dir /tmp /tmp
soap.wsdl_cache_enabled 1 1
soap.wsdl_cache_limit 5 5
soap.wsdl_cache_ttl 86400 86400
pear list-all command shwo that soap mudule is installed
pear/SOAP 0.11.0
I get the following error when I run the client using php soaptest1.php
Warning: SoapClient::SoapClient(http://api.google.com/GoogleSearch.wsdl): failed
to open stream: HTTP request failed! in /var/www/html/soaptest1.php on line 2
Call Stack:
0.0003 50760 1. {main}() /var/www/html/soaptest1.php:0
0.0003 51008 2. SoapClient->SoapClient() /var/www/html/soaptest1.php:2
Warning: SoapClient::SoapClient(): I/O warning : failed to load external entity
"http://api.google.com/GoogleSearch.wsdl" in /var/www/html/soaptest1.php on line 2
Call Stack:
0.0003 50760 1. {main}() /var/www/html/soaptest1.php:0
0.0003 51008 2. SoapClient->SoapClient() /var/www/html/soaptest1.php:
2
Fatal error: SOAP-ERROR: Parsing WSDL: Couldn't load from 'http://api.google.com
/GoogleSearch.wsdl' in /var/www/html/soaptest1.php on line 2
Call Stack:
0.0003 50760 1. {main}() /var/www/html/soaptest1.php:0
0.0003 51008 2. SoapClient->SoapClient() /var/www/html/soaptest1.php:
2
Can someone help me!!!!!
Thanks
Gaura
feyd | Please use
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]