DEV Community

[Comment from a deleted post]
Collapse
 
conex_web profile image
conex digital

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?

Collapse
 
dopitz profile image
Daniel O.

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);
Collapse
 
conex_web profile image
conex digital

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

 
dopitz profile image
Daniel O.

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.

 
conex_web profile image
conex digital

is it possible to convert soup into a RESTful?

 
dopitz profile image
Daniel O.

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

 
conex_web profile image
conex digital

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