예제 #1
0
 public function index01Action()
 {
     echo "<h3 style='color:red;font-weight:bold'>" . __METHOD__ . "</h3>";
     $autoLoader = new \Zend\Loader\StandardAutoloader(array("autoregister_zf" => true));
     $autoLoader->registerNamespace("Database", LIB_PATH . "/Database");
     $autoLoader->registerPrefix("Mail", LIB_PATH . "/Mail");
     $autoLoader->register();
     $student = new \Database\Student();
     $teacher = new \Database\Teacher();
     $people = new \Database\basetada\People();
     $sender = new \Mail_Sender();
     $google_sender = new \Mail_google_sender();
     return false;
 }
예제 #2
0
class educacion
{
    /**
     * @return Universidad[] arrayOfLetters
     */
    public function universidad()
    {
        $arreglo[] = array("cod_institucion" => '000001', "siglas" => 'UCV', "cod_carrera" => '006');
        $arreglo[] = array("cod_institucion" => '000002', "siglas" => 'UCV', "cod_carrera" => '007');
        $arreglo[] = array("cod_institucion" => '000003', "siglas" => 'UNEFA', "cod_carrera" => '008');
        return $arreglo;
    }
}
/* load framework ZF2 */
set_include_path('/srv/www/io/ZendFramework-2.3.2/library');
require_once 'Zend/Loader/StandardAutoloader.php';
$loader = new Zend\Loader\StandardAutoloader(array('autoregister_zf' => true));
$loader->registerPrefix('Zend', '/srv/www/io/ZendFramework-2.3.2/library');
$loader->register();
/* class autodiscover and Zend\Soap\Server */
if (isset($_GET['wsdl'])) {
    $strategy = new Zend\Soap\Wsdl\ComplexTypeStrategy\ArrayOfTypeComplex();
    $server = new Zend\Soap\AutoDiscover($strategy);
    $server->setServiceName('WebServiceEducacion');
} else {
    $server = new Zend\Soap\Server();
}
$uri = 'http://webservice.io/HelloWorld/server.php';
$server->setClass('educacion');
$server->setUri($uri);
$server->handle();