Answer the question
In order to leave comments, you need to log in
How to implement request using PHP SoapClient?
// Получаю экземпляр SoapClient
$url = "";
$client = new SoapClient($url, ["trace" => 1, "exception" => 0]);
// Получаю список доступных SOAP-функций
$client->__getFunctions();
array(2) {
[0]=>
string(44) "GetDataResponse GetData(GetData $parameters)"
[1]=>
string(44) "GetDataResponse GetData(GetData $parameters)"
}
// Вызываю SOAP-функцию
$client->GetData($parameters);
// Возвращаю SOAP-ответ
$client->__getLastResponse();
__last_response
? Am I doing it right? $options = ['trace' => 1, 'exception' => 0]
, I don't get the __last_response
. Instead, I get the following. Why?object(SoapClient)#82 (5) {
["_soap_version"]=>
int(1)
["sdl"]=>
resource(5) of type (SOAP SDL)
["httpsocket"]=>
resource(6) of type (stream)
["_use_proxy"]=>
int(0)
["httpurl"]=>
resource(7) of type (SOAP URL)
}
Answer the question
In order to leave comments, you need to log in
If the request is not HTTPS, I recommend installing the WireShark program and trying to see what other requests are. Then you can compose a request in the form of text and send it. And only then figure out how to hang the code on it all, which is sewn in puff under the word Soap.
Because there is so much hell in this standard that simplifies life that it would be better if it didn’t exist.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question