I'm trying to use a SOAP service called Chaverweb. I have their WSDL; it's here.
When I try to make a simple request like GetCWVersion, it's working, but whenever I try to request a function that would need some sort of authentication, like Get_Syn_Comsend (getting an institute's details), it doesn't work.
I tried setting AuthHeader as specified in the WSDL, but it's not working.
Here's my code. I'm hoping there's something obvious I'm not doing since this is my first time working with SOAP:
try {
$soapClient = new SoapClient('https://www.chaverweb.net/Synagogue.asmx?WSDL');
$header = new SoapHeader('https://www.chaverweb.net/webservices/', 'AuthHeader', array("Username"=>"[email protected]", "Password"=>"...", "SynKey"=>"..."), false);
$header2 = new SoapHeader('https://www.chaverweb.net/webservices/', 'SFHeader', array("sf"=>""), false);
$soapClient->__setSoapHeaders(array($header, $header2));
$versionResponse = $soapClient->Get_Syn_Comsend();
print_r($versionResponse);
} catch (SoapFault $exception) {
echo "Exception: " . $exception->getMessage();
}
This, by the way, gives me: stdClass Object ( ) Thank you very much!