define('LIVE', 0);
$MEMBERID = ['38381',''];
$USERID = ['3838102',''];
$PASSWORD = ['@12345',''];
$options = [
'soap_version'=> SOAP_1_2,
'exceptions'=> true,
'trace'=> 1,
'cache_wsdl'=>WSDL_CACHE_NONE,
];
$url = "http://bsestarmfdemo.bseindia.com/MFOrderEntry/MFOrder.svc?singleWsdl";
$client = new \SoapClient($url, $options);
$headers = [
new \SoapHeader(
'http://www.w3.org/2005/08/addressing',
'Action',
'http://bsestarmf.in/MFOrderEntry/getPassword',
$mustUnderstand = true
),
new \SoapHeader(
'http://www.w3.org/2005/08/addressing',
'To',
'http://bsestarmfdemo.bseindia.com/MFOrderEntry/MFOrder.svc',
$mustUnderstand
),
];
$client->__setSoapHeaders($header);
$params = array(
'MemberId' => $MemberId[$LIVE],
'UserId' => $UserId[$LIVE],
'Password' => $password[$LIVE],
'PassKey' => $passkey[$LIVE]
);
try{
$client->$response = $client->__soapCall('getPassword', compact('params'));
}catch(Exception $e) {
echo 'Message: '.$e->getMessage();
}
Whats wrong with my code?
M still getting the error:
Message: The SOAP action specified on the message, '', does not match the HTTP SOAP Action, 'http://bsestarmf.in/MFOrderEntry/getPassword'.