Ver Mensaje Individual
  #1 (permalink)  
Antiguo 26/02/2016, 11:17
zerobathory
 
Fecha de Ingreso: enero-2012
Mensajes: 55
Antigüedad: 12 años, 4 meses
Puntos: 1
Como invocar un webservice en php??

Hola, buenas tardes, acudo a ustedes para ver si pueden ayudarme... Mi empresa esta entregando a una tienda llamada Soriana, la cual nos pide que para que nos paguen, le enviemos el CFDI por medio de un webservice, estoy tratando de hacer la aplicacion con php con SOAP para enviar el xml de la factura, trato de hacerlo asi:

Código PHP:
<html>
    <head>
        <title>Soriana</title>
    </head>
    <body>
        <form action="index.php" method="POST">
            <label>Enviar</label><input type="file" name="xml">
            <button type="submit">Enviar</button>
        </form>
        <?php
    
if(isset($_POST['xml'])){
        
$xml=$_POST['xml'];
        
$client=new SoapClient("http://serviciosweb.soriana.com/RecibeCfd/wseDocRecibo.asmx");
        
$resultado$client->__doRequest($xml);
        echo 
$resultado;
    }
?>
    </body>
</html>
Al hacer esto me manda un error que es el siguiente:
Fatal error: Uncaught SoapFault exception: [WSDL] SOAP-ERROR: Parsing WSDL: Couldn't load from 'http://serviciosweb.soriana.com/RecibeCfd/wseDocRecibo.asmx' : Premature end of data in tag html line 3 in /home/deshoping2014/public_html/deshoping.com/factura/index.php:13 Stack trace: #0 /home/deshoping2014/public_html/deshoping.com/factura/index.php(13): SoapClient->SoapClient('http://servicio...') #1 {main} thrown in /home/deshoping2014/public_html/deshoping.com/factura/index.php on line 13


No se que estoy haciendo mal, pueden ayudarme?