loading...

re: Implementing a SOAP API with PHP VIEW POST

FULL DISCUSSION
 

Friend I think it is very interesting the contribution I would like to know how to implement with several changes as
if the soap is a url
(celcer.sri.gob.ec/comprobantes-ele...)
and if the shipping method is POST with some shipping parameters
(KeyProofAccess)
and how would the api type call in the url?

 

You can try this:

$wsdl = 'https://celcer.sri.gob.ec/comprobantes-electronicos-ws/AutorizacionComprobantesOffline?wsdl';

$client = new \Zend\Soap\Client($wsdl, [
    'soap_version' => SOAP_1_1,
]);

$result = $client->call('autorizacionComprobante', [[
    'claveAccesoComprobante' => 'secret-key'
]]);

var_export($result);
 

Thanks, it works fine, I just want to implement type api rest sending method POST

if(isset($_GET['c']) && !empty($_GET['c'])){
$key['number'] = addslashes(ucwords($_GET['c']));
}else{
$key['number'] = 'FALSE';

How to formulate a POST method
type api res

Sorry, I don't understand the question. The article and the context is about a SOAP webservices and not about REST or RESTful API's.

is it possible to convert soup into a RESTful?

No, this is something completely different and would have to be completely rewritten.

thanks for all the information it helped me a lot to understand the soap

code of conduct - report abuse