Example #1
0
<?php

$srv = "http://" . $_SERVER["SERVER_NAME"] . str_replace("test/service_test2.php", "", $_SERVER["SCRIPT_NAME"]);
//$srv="http://".$_SERVER["SERVER_NAME"].str_replace("test/service_test.php","",$_SERVER["SCRIPT_NAME"]);
try {
    $clienteSOAP = new SoapClient($srv . 'service2.wsdl', array('features' => SOAP_SINGLE_ELEMENT_ARRAYS, 'trace' => 1));
    $items = array(array('00002335', 'Producto de prueba 5', '10', '5', '0'));
    $apr = array('2007-02-01T16:32:34.948Z', '000136', '21', 0, 50, 24.0, '00000345', '00', 'Prueba nestor', $items);
    echo $clienteSOAP->RegistrarFactura($apr) . "<br>";
    //echo $clienteSOAP->RegistrarFactura('2007-02-01T16:32:34.948Z','000136','21',0,205.80,24.00,'00000345','00','Prueba nestor',$items)."<br>";
    //echo "REQUEST:\n" . htmlentities($clienteSOAP->__getLastRequest()) . "\n";
    //echo $clienteSOAP->AnularFactura(array(array('numero_anul'=>'888890'),array('numero_anul'=>'888890'),array('numero_anul'=>'888890')))."<br>";
    //echo $clienteSOAP->RegistrarNotaCredito('888889','2007-02-01T16:32:34.948Z','01',1000.00,120.00,'01','Test','Prueba');
} catch (SoapFault $e) {
    var_dump($e);
}