<?php
require_once '../zend/vendor/autoload.php';
$loader = new Zend\Loader\StandardAutoloader(array('autoregister_zf' => true));
$loader->register();
require_once("configuracion_db.php");
require_once("clases_db.php");
try {
  if (isset($_GET['wsdl'])) {
    $autodiscover = new Zend\Soap\AutoDiscover();
    $autodiscover->setClass('Workflow')->setUri('LOCATION_WSDL');
    header('Content-type: application/xml');
    echo $autodiscover->generate()->toXml();
  } else {
    $servidorSOAP = new SOAPServer(WSDL);
    $servidorSOAP->setClass('Workflow');
    $servidorSOAP->handle();
  }
} catch (SOAPFault $f) {
    print $f->faultstring;
}
?>
