SOAP Client php
I'm need a little help about WS SOAP Client in PHP.
I have a WS SOAP, restrict to my IP, but I don know almost anything about
SOAP, I've already use SOAP with rails a long time ago.
If I access the SOAP server from my browser using this:
http://thedomain.com/wssitedsv/site.asmx/RetornaGanhadores
The server return me the correct XML.
If I access the SOAP server from my browser using this:
http://thedomain.com/wssitedsv/site.asmx?wsdl
The server return a xml with configuration of the SOAP
In the PHP I'm doing it:
$url = "http://thedomain.com/wssitedsv/site.asmx?wsdl";
$client = new SoapClient($url);
$return = $client->RetornaGanhadores(NULL);
echo $return;
And I'm getting this error:
PHP Fatal error: Uncaught SoapFault exception: [HTTP] Could not connect
to host in /Users/sidnei/Sites/suasorte/scripts/get_data.php:15
\\nStack trace:
\\n#0 [internal function]: SoapClient->__doRequest('<?xml version="...',
'http://192.168....', 'https://www.tte...', 1, 0)
\\n#1 /Users/sidnei/Sites/suasorte/scripts/get_data.php(15):
SoapClient->__call('RetornaGanhador...', Array)
\\n#2 /Users/sidnei/Sites/suasorte/scripts/get_data.php(15):
SoapClient->RetornaGanhadores(NULL)
\\n#3 /Users/sidnei/Sites/suasorte/index.php(2):
include('/Users/sidnei/S...')
\\n#4 {main}
\\n thrown in /Users/sidnei/Sites/suasorte/scripts/get_data.php on line 15
I can get all methods from Server using this:
$url = "http://thedomain.com/wssitedsv/site.asmx?wsdl";
$client = new SoapClient($url);
$return = $client->__getFunctions();
print_t $return;
What I am doing wrong to use this SOAP server?
How use a SOAP Server in PHP?
I appreciate any help.
Thanks
No comments:
Post a Comment