Для ниже soap Запрос API Имеет wsa-адресацию со значением по умолчанию wsa: To http://bsestarmf.in/MFOrderEntry/getPassword
Код
$client = new SoapClient("https://bsestarmfdemo.bseindia.com/MFOrderEntry/MFOrder.svc?singleWsdl",
array('soap_version' => SOAP_1_2,'trace' => 1,'exceptions'=> false
) );
$wsa_namespace = 'http://www.w3.org/2005/08/addressing';
$ACTION_ISSUE = 'https://bsestarmf.in/MFOrderEntry/getPassword';// Url With method name
$NS_ADDR = 'http://www.w3.org/2005/08/addressing';
$action = new SoapHeader($NS_ADDR, 'Action', $ACTION_ISSUE, true);
$to = new SoapHeader($NS_ADDR, 'To',
'https://bsestarmfdemo.bseindia.com/MFOrderEntry/MFOrder.svc/Secure', false);
$headerbody = array('Action' => $action,'To' => $to);
$client->__setSoapHeaders($headerbody);
$parameters=array('UserId'=>'******','MemberId'=>'*****','Password' => '*****','PassKey' =>
'******');
$result = $client->__soapCall('getPassword', array($parameters));//getPassword method name
echo json_encode($result);
Я получаю сообщение об ошибке ниже.
{"faultstring": "Не удалось подключиться к хосту", "код ошибки": "HTTP"}