How to create soap API containing data from database in laravel?
I have done rest API but the client need SOAP API to implement it in a queue management system. I don't know much about soap and XML.
How to create soap API containing data from database in laravel?
I have done rest API but the client need SOAP API to implement it in a queue management system. I don't know much about soap and XML.
You can use this package: https://github.com/econea/nusoap, instantiate a server and register your endpoints
$server = new \nusoap_server();
$server->configureWSDL('TestService', "urn:delos", url('ws-delos') , 'rpc');
$this->server->register('Receive_products',
[
'id' => 'xsd:int',
'name' => 'xsd:string',
'category' => 'xsd:string',
],
[
'output' => 'xsd:string'
],
"urn:delos",
"urn:delos#Receive_products", <--- this function must be registered global in Laravel
"rpc",
'encoded',
"Receive products data");
Check for other aswers with this implementation: nusoap simple server