J
J
JoyceGraham2014-06-20 08:21:23
PHP
JoyceGraham, 2014-06-20 08:21:23

How to use SOAP client?

Hello. Don't kick too hard, as the web is not my profile, but I need to complete an assignment at the university. I have a SOAP web service in php and a client in php that can access the service, as well as a website with data that I receive from the service. How can I use the client to call the service, by pressing a button on the site, for example, to delete or add data and then display it on the site?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
sasha, 2014-06-20
@JoyceGraham

Well, when you click on the button, make an ajax request to the server, and the server makes a request to the soap service.
soap has its own methods that can be called.

$client = new SoapClient(ТУТ_ССЫЛКА_НА_СЕРВИС, а тут параметры);
$result=$client->МЕТОД_SOAP_СЕРВИСА(АРГУМЕНТЫ);

and here in $result there will be a response object from the service

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question