S
S
ssrdop2017-08-09 12:31:55
css
ssrdop, 2017-08-09 12:31:55

How to solve SOAP problem "Function 'sendSms' doesn't exist" when getFunctions returns my "sendSms" method?

I'm trying to write my soap server in php according to the manual from the Habr article "Writing a SOAP client-server application in PHP"
Having reached the server health check from point 6 (I call the client), I get an error

Uncaught SoapFault exception: [SOAP-ENV:Server] Function 'sendSms' doesn't exist in

But if I use the $client->__getFunctions() function, then it prints out to me that this function exists, with the parameters and output values ​​defined in the article.
How can that be? The function is defined, but it can't be called?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexey, 2019-03-25
Dovator

You can pass a parameter to the view and simply display css on it, you can hide it in JS.
Can you see the view code? Can the widget pass the parameter to display \ no?

M
mikhail2704, 2019-04-28
@ssrdop

You need to add the SoapSmsGateWay.class.php class:
<?php
/**
* /classes/SoapSmsGateWay.class.php
*/
class SoapSmsGateWay {
public function sendSms($messagesData){
$rawPost = "Input:\r\n";
$rawPost .= file_get_contents('php://input');
$rawPost .= "\r\n---\r\nmessageData:\r\n";
$rawPost .= serialize($messagesData);
file_put_contents("log.txt",$rawPost);
return array("status" => "true");
}
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question