Hi,
Im trying to make a soap connection and am using the following an example found on the web (http://www.usenet-forums.com/alt-comp-l ... https.html) which is:
require_once('lib/nusoap.php');
$proxyhost='http://myproxyserver';
$proxyport=8080;
$proxyusername='MY_NT_DOMAIN\thegunner';
$proxypassword='mypassword';
try {
$client = new SoapClient(
"https://www.secureach.com/CheckVerifyNo ... .asmx?WSDL", array('trace' => true), $proxyhost, $proxyport, $proxyusername, $proxypassword);
}
catch (SoapFault $sf) {
echo $sf->getMessage(), "\n";
}
echo "Types:\n";
foreach ($client->__getTypes() as $type)
echo $type, "\n";
echo "Functions:\n";
foreach ($client->__getFunctions() as $function)
echo $function, "\n";
But I get an error message:
Fatal error: Call to undefined method soapclient::__getTypes() in C:\wamp\www\client.php on line 23
Obviously I odn;'t seem to have this __getTypes() function in my nusoap.php......does anyone know what it should contain so I can insert it?...or know of any other reason why this error should be occurring?
Thanks,
SOAP & $client->__getTypes()
Moderator: General Moderators
Re: SOAP & $client->__getTypes()
Not sure, but here's my guess:
You're behind a proxy, thus the $proxy variables. But the SoapClient constructor only takes two arguments: a URL and options. The rest will be ignored because PHP is nice like that. So SoapClient tries to get the URL and go into WSDL mode. But it can't because you're behind a proxy and didn't tell say how to get past it. So no WSDL mode. And since __getTypes is only valid in WSDL mode you get an error when trying to call it.
How's that sound?
You can probably download the WSDL definitions manually (you can configure cURL to pass through a proxy) then pass the downloaded file's name to SoapClient.
You're behind a proxy, thus the $proxy variables. But the SoapClient constructor only takes two arguments: a URL and options. The rest will be ignored because PHP is nice like that. So SoapClient tries to get the URL and go into WSDL mode. But it can't because you're behind a proxy and didn't tell say how to get past it. So no WSDL mode. And since __getTypes is only valid in WSDL mode you get an error when trying to call it.
How's that sound?
You can probably download the WSDL definitions manually (you can configure cURL to pass through a proxy) then pass the downloaded file's name to SoapClient.
Re: SOAP & $client->__getTypes()
That's all sounds about right 
Ok so I need to get past my proxy some other way...when I did some searhcing on the net for this, it mentioned about putting the proxy variables in the new SoapClient($wdsl,true......) section. Ok I'll have alook and see how I can do this alternatively - not unless you know
I was trying : $client->setUseCurl(1); - as this all it was using in the samples.
Ok so I need to get past my proxy some other way...when I did some searhcing on the net for this, it mentioned about putting the proxy variables in the new SoapClient($wdsl,true......) section. Ok I'll have alook and see how I can do this alternatively - not unless you know
I was trying : $client->setUseCurl(1); - as this all it was using in the samples.