I'm having trouble connecting to a wsdl service through PHP. The trouble seems to come in authentication. Here is my code so far:
$soapURL = "http://myurl?wsdl";
$soapLogin = Array(
'User ID'=>'myusername',
'Password'=>"mypassword"
);
$soapClient = new SoapClient($soapURL, $soapLogin);
$soapResult = $soapClient->mySoapFunction();
I have the username and password as defined by the client, and I can see the XML file that the wsdl generates but no I cannot discern if I am referencing the username and passwords correctly. When trying to connect I get the following error:
Fatal error: Uncaught SoapFault exception: [a:InvalidSecurity] An error occurred when verifying security for the message. in E:\xampp\htdocs\TRMSosf\index.php:15 Stack trace: #0 E:\xampp\htdocs\TRMSosf\index.php(15): SoapClient->__call('GetWeekEvents', Array) #1 E:\xampp\htdocs\TRMSosf\index.php(15): SoapClient->GetWeekEvents('10', '20130527') #2 {main} thrown in E:\xampp\htdocs\TRMSosf\index.php on line 15
I'm new to using SOAP and fairly new to PHP, any help is appreciated.