T
T
Torna2015-07-11 03:19:14
PHP
Torna, 2015-07-11 03:19:14

Authorization via SOAP WSDL how?

There is:

Array
(
    [0] => LoginResponse Login(LoginRequest $parameters)
)
Array
(
    [0] => struct LoginRequest {
 string Password;
 string User;
}
    [1] => struct LoginResponse {
 TLoginResponseData ResponseData;
 TResponseStatusData ResponseStatus;
}
    [2] => struct TLoginResponseData {
 string SessionToken;
}
    [3] => struct TResponseStatusData {
 integer ErrorCode;
 string ErrorMessage;
}

I'm trying to authenticate:
ini_set('display_errors', 1);
error_reporting(E_ALL);
$client = new SoapClient('https://aisws.ingos.ru/sales-test/SalesService.svc?wsdl', array('trace' => 1));
//print_r($client->__getFunctions());
//print_r($client->__getTypes());
$parameters = array ('Password' => 'passsword', 'User' => 'user');
$request = $client->Login($parameters);
$result = $request->LoginRequest;
print_r ($result);

Answer:
<b>Notice</b>:  Undefined property: stdClass::$LoginRequest in <b>index.php</b> on line <b>50</b><br />

What am I doing wrong? I am working with the protocol for the first time, I will be very grateful for good links and examples.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
T
Torna, 2015-07-11
@Torn

Re-requested

$request = $client->Login($parameters);
//$result = $request->LoginRequest;
print_r ($request);

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question