<?php
$pathToZend = dirname(__FILE__) . '/../ZendFramework-1.10.8/library/';
set_include_path(get_include_path() . PATH_SEPARATOR
. $pathToZend);
include(dirname(__FILE__) . '/EleitorModel.php');
include_once('Zend/Soap/Client.php');
try
{
$wsdl = 'http://localhost/artigos/spider_to_webservice/EleitorService.php?wsdl';
$options = array("classmap" => array('EleitorModel' => 'EleitorModel'));
$nome = isset($_GET['nome']) ?
$_GET['nome'] : $argv[1];
$data = isset($_GET['data']) ?
$_GET['data'] : $argv[2];
$client = new Zend_Soap_Client
($wsdl,$options);
$eleitor = $client->consultaSituacao($nome, $data);
print_r($eleitor);
} catch
(Exception
$e) {
echo $e->getMessage() . "\n";
}
?>
Add a code snippet to your website: paste.org