Implement web service php

0

Good day I am having trouble to consume a service done in java. I have this example that is done in java and works correctly but when I try to do it in php it does not work.

Here is my code:

<?php
ini_set('soap.wsdl_cache_enabled', 0);
ini_set('soap.wsdl_cache_ttl', 0);
$wsdl = 'https://dpfactura.com.co/wsFact_e/InterSoap?wsdl';  // @see http://developer.yousign.fr/
$headerbody = array(
  'username' => 'FHEMATOLOGICA',
  'password' => 'PASSWORD',
  'token'  => 'TOKEN'
);
$header = new SOAPHeader($wsdl, 'InterSoap', $headerbody);        
        
// set the Headers of Soap Client.
$client = new SoapClient($wsdl); 
$client->__setSoapHeaders($header); 
$eBfelEncabezadofacturas = array(
  'tipodocumento ' => "1",
  'prefijo' => "PRUE",
  'consecutivo' => 984130000,
  'echafacturacion'=>"2018-08-04 10:00:00",
  'moneda'=>"COP",
  'totalimportebruto'=>190000.00,
  'totalbaseimponible'=>1000000.00,
  'totalfactura'=>1190000.00,
  'tiponota'=>"2",
  'tokenempresa'=>'55ef06e54e7faee0614f26ff86a8933aee16c72b'
);
$respuesta = $client->__soapCall("enviarFactura", $eBfelEncabezadofacturas);
?>
    
asked by Jorge Leonardo Correa Muñoz 09.07.2018 в 18:19
source

0 answers