<?php

class Test_Webservice extends Controller {

    public function index() {
        
        $webservice = new SoapClient(
                null, array(
            'location' => 'http://localhost:90/ws/webservices/',
            'uri' => 'urn:webservices',
            'trace' => 1,
            'exception' => 1,
            'login' => 'test',
            'password' => 'test1234'
                )
        );
        
        $data = $webservice->getProveedores();
	print_r($data);
        die();
        
/*
	$data = $webservice->getProveedores();
	print_r($data);
        echo "<br />";*/
        
        //header ("Content-Type:text/xml");
        /*$data = $webservice->getNotasPedidosPendientes();
        print_r($data);
       die(); 
        echo "<br />";
        
        $data = $webservice->getPaquetesPedidos();
        print_r($data);
        
        echo "<br />";*/
        
        $data = $webservice->getNotasNroPedido(13);
        print_r($data);
        echo "<br />";
        /*
        echo str_replace("<value ", "\n<value ", str_replace("<key ", "\n<key ", str_replace("</item>", "</item>\n", str_replace("</value>", "</value>\n", $webservice->__getLastResponse()))));
        
        $data = $webservice->getNotasPedido(42, 2);
        print_r($data);
        echo "<br />";;
        echo str_replace("<value ", "\n<value ", str_replace("<key ", "\n<key ", str_replace("</item>", "</item>\n", str_replace("</value>", "</value>\n", $webservice->__getLastResponse()))));
		*/
    }

}
