public function openinvoiceAction()
 {
     $_mode = $this->_getConfigData('demoMode');
     $wsdl = $_mode == 'Y' ? 'https://ca-test.adyen.com/ca/services/OpenInvoiceDetail?wsdl' : 'https://ca-live.adyen.com/ca/services/OpenInvoiceDetail?wsdl';
     $server = new SoapServer($wsdl);
     $server->setClass(self::OPENINVOICE_SOAP_SERVER);
     $server->addFunction(SOAP_FUNCTIONS_ALL);
     $server->handle();
     exit;
 }
Example #2
0
function soap_serve($wsdl, $functions)
{
    // create server object
    $s = new SoapServer($wsdl);
    // export functions
    foreach ($functions as $func) {
        $s->addFunction($func);
    }
    // handle the request
    $s->handle();
}
 /**
  * Executa os métodos no ambiente de homologação do webservice SOAP
  */
 public function homologacaoAction()
 {
     $this->noLayout();
     ini_set('soap.wsdl_cache_enabled', '0');
     $sWsdl = $this->view->baseUrl('/webservice/wsdlValidations/homologacao/modelo1.wsdl');
     $server = new SoapServer($sWsdl, array('soap_version' => SOAP_1_1, 'uri' => $this->view->baseUrl('/webservice/index/homologacao/'), 'trace' => TRUE));
     $server->setClass('WebService_Model_Processar');
     $server->addFunction('RecepcionarLoteRps');
     $server->addFunction('ConsultarSituacaoLoteRps');
     $server->addFunction('ConsultarNfsePorRps');
     $server->addFunction('ConsultarLoteRps');
     $server->addFunction('CancelarNfse');
     $server->addFunction('ConsultarNfse');
     $server->handle();
 }
 public function handle()
 {
     $result = $this->generateSoapXML($this->data);
     $result = new SimpleXMLElement($result);
     if ($this->wsdl_out == true) {
         //header("Content-Type: application/xml; charset=utf-8");
         //echo $result->asXml();
         $tmpfile = tempnam(sys_get_temp_dir(), "wsdl");
         $file = fopen($tmpfile, "w");
         fwrite($file, $result->asXml());
         fclose($file);
         $server = new SoapServer($tmpfile);
         foreach ($this->data as $value) {
             $server->addFunction($value->funcName);
         }
         $server->handle();
         unlink($tmpfile);
         return;
     } else {
         echo $this->echoXML($result->asXml());
     }
 }
Example #5
0
 * 
 * @link	3.Notifications/soap/notification_server.php 
 * @author	Created by Adyen - Payments Made Easy
 */
/**
 * Create a SoapServer which implements the SOAP protocol used by Adyen and 
 * implement the sendNotification action in order to call a function handling
 * the notification.
 * 
 * new SoapServer($wsdl,$options)
 * - $wsdl points to the wsdl you are using;
 * - $options[cache_wsdl] = WSDL_CACHE_BOTH, we advice 
 *   to cache the WSDL since we usually never change it.
 */
$server = new SoapServer("https://ca-test.adyen.com/ca/services/Notification?wsdl", array("style" => SOAP_DOCUMENT, "encoding" => SOAP_LITERAL, "cache_wsdl" => WSDL_CACHE_BOTH, "trace" => 1));
$server->addFunction("sendNotification");
$server->handle();
function sendNotification($request)
{
    /**
     * In SOAP it's possible that we send you multiple notifications
     * in one request. First we verify if the request the SOAP envelopes.
     */
    if (isset($request->notification->notificationItems) && count($request->notification->notificationItems) > 0) {
        foreach ($request->notification->notificationItems as $notificationRequestItem) {
            /**
             * Each $notificationRequestItem contains the following fields:
             * $notificationRequestItem->amount->currency
             * $notificationRequestItem->amount->value
             * $notificationRequestItem->eventCode
             * $notificationRequestItem->eventDate
        deleteDirectory($tempPath);
        deleteDirectory($tempPathNewFiles);
        return serialize($data);
    } else {
        deleteDirectory($tempPath);
        deleteDirectory($tempPathNewFiles);
        return false;
    }
}
/**
 * @param $directoryPath
 * @return bool
 */
function deleteDirectory($directoryPath)
{
    $files = array_diff(scandir($directoryPath), array('.', '..'));
    foreach ($files as $file) {
        if (is_dir("{$directoryPath}/{$file}")) {
            deleteDirectory("{$directoryPath}/{$file}");
        } else {
            unlink("{$directoryPath}/{$file}");
        }
    }
    return rmdir($directoryPath);
}
$webPath = api_get_path(WEB_PATH);
$webCodePath = api_get_path(WEB_CODE_PATH);
$options = array('uri' => $webPath, 'location' => $webCodePath . 'webservices/additional_webservices.php');
$soapServer = new SoapServer(NULL, $options);
$soapServer->addFunction('wsConvertPpt');
$soapServer->handle();
Example #7
0
    if (!isset($Encoding)) {
        $A->Encoding = 2;
    } else {
        $A->Encoding = $Encoding;
    }
    $xml_result = $A->DoXML();
    if ($A->IsError == 1) {
        return -1;
    }
    return $xml_result;
}
/*$login_password = new LogPass;
$login_password->login = "******";
$login_password->password = "******";

print_r(authorize($login_password));*/
ini_set("soap.wsdl_cache_enabled", "0");
// отключаем кэширование WSDL
$server = new SoapServer("gateway_ver3.xml", array('encoding' => 'UTF-8'));
$server->addFunction("get_user_by_phone");
$server->addFunction("get_name_by_phone");
$server->addFunction("get_statistic");
$server->addFunction("save_call");
$server->addFunction("authorize");
$server->addFunction("keep_alive");
$server->addFunction("session_kill");
$server->addFunction("get_pause_statuses");
$server->addFunction("get_pause_curent_status");
$server->addFunction("set_pause_curent_status");
$server->addFunction("get_queue_stat");
$server->handle();
Example #8
0
<?php

// Описание функции Web-сервиса
function getStock($id)
{
    $stock = array("1" => 100, "2" => 200, "3" => 300, "4" => 400, "5" => 500);
    if (isset($stock[$id])) {
        $quantity = $stock[$id];
        return $quantity;
    } else {
        throw new SoapFault("Server", "Несуществующий id товара");
    }
}
// Отключение кэширования WSDL-документа
ini_set("soap.wsdl_cache_enabled", "0");
// Создание SOAP-сервер
$server = new SoapServer("http://mysite.local/demo/soap/stock.wsdl");
// Добавить класс к серверу
$server->addFunction("getStock");
// Запуск сервера
$server->handle();
 /**
  * Get SoapServer object
  *
  * Uses {@link $_wsdl} and return value of {@link getOptions()} to instantiate
  * SoapServer object, and then registers any functions or class with it, as
  * well as peristence.
  *
  * @return SoapServer
  */
 protected function _getSoap()
 {
     $options = $this->getOptions();
     $server = new SoapServer($this->_wsdl, $options);
     if (!empty($this->_functions)) {
         $server->addFunction($this->_functions);
     }
     if (!empty($this->_class)) {
         $args = $this->_classArgs;
         array_unshift($args, $this->_class);
         if ($this->_wsiCompliant) {
             #require_once 'Zend/Soap/Server/Proxy.php';
             array_unshift($args, 'Zend_Soap_Server_Proxy');
         }
         call_user_func_array(array($server, 'setClass'), $args);
     }
     if (!empty($this->_object)) {
         $server->setObject($this->_object);
     }
     if (null !== $this->_persistence) {
         $server->setPersistence($this->_persistence);
     }
     return $server;
 }
Example #10
0
    if ($vsResult->status_code !== 0) {
        return $vsResult;
    }
    if (ifPermission($params->sessionId, 'PM_CASES') == 0) {
        $result = new wsResponse(2, G::LoadTranslation('ID_NOT_PRIVILEGES'));
        return $result;
    }
    G::LoadClass('sessions');
    $oSessions = new Sessions();
    $session = $oSessions->getSessionUser($params->sessionId);
    $ws = new wsBase();
    $res = $ws->claimCase($session['USR_UID'], $params->guid, $params->delIndex);
    return $res;
}
$server = new SoapServer($wsdl);
$server->addFunction("Login");
$server->addFunction("ProcessList");
$server->addFunction("CaseList");
$server->addFunction("UnassignedCaseList");
$server->addFunction("RoleList");
$server->addFunction("GroupList");
$server->addFunction("DepartmentList");
$server->addFunction("UserList");
$server->addFunction("TriggerList");
$server->addFunction("outputDocumentList");
$server->addFunction("inputDocumentList");
$server->addFunction("inputDocumentProcessList");
$server->addFunction("removeDocument");
$server->addFunction("SendMessage");
$server->addFunction("SendVariables");
$server->addFunction("GetVariables");
Example #11
0
<?php

function Demo($param1)
{
    return 'Request received with param1 = ' . $param1;
}
$server = new SoapServer('demo.wsdl');
$server->addFunction('Demo');
$server->handle();
Example #12
0
     * Can't even say, which certificates, however it says in the docu that this should be a .pem RSA encoded file with .key and .crt together.
     *
     */
    $context = array('ssl' => array('verify_peer' => false, 'allow_self_signed' => true, 'local_cert' => $sslCert, 'passphrase' => 'hisuser', 'capture_peer_cert' => true));
    $stream_context = stream_context_create($context);
    $server = new SoapServer($wsdl, array('soap_version' => SOAP_1_1, 'stream_context' => $stream_context));
} else {
    $server = new SoapServer($wsdl, array('soap_version' => SOAP_1_1));
}
/**
 * adds the functions to the SoapServer Object,
 *
 * the sChangeSurvey function should be commented out for productive Use
 */
//$server->addFunction("sChangeSurvey");
$server->addFunction("sDeleteSurvey");
$server->addFunction("sActivateSurvey");
$server->addFunction("sCreateSurvey");
$server->addFunction("sInsertToken");
$server->addFunction("sTokenReturn");
$server->addFunction("sInsertParticipants");
$server->addFunction("sImportGroup");
$server->addFunction("sAvailableModules");
$server->addFunction("sImportQuestion");
$server->addFunction("sImportMatrix");
$server->addFunction("sImportFreetext");
$server->addFunction("sSendEmail");
$server->addFunction("sGetFieldmap");
$server->addFunction("fSendStatistic");
// handle the soap request!
if ($enableLsrc === true) {
Example #13
0
        return '1' . chr(9) . $svar;
    }
    $linje = "update ordrelinjer set leveret = antal,leveres='0' where ordre_id = '{$ordre_id}' and vare_id>'0'";
    fwrite($fp, $linje . "\n");
    $svar = db_modify($linje, __FILE__ . " linje " . __LINE__);
    $linje = "bogfor({$ordre_id},'on')";
    fwrite($fp, $linje . "\n");
    $svar = bogfor($ordre_id, 'on');
    list($fejl, $svar) = explode(chr(9), $svar);
    fwrite($fp, $fejl . " " . $svar . "\n");
    if ($fejl != 'OK') {
        $linje = "{$fejl}";
        #		fwrite($fp,$linje."\n");
        return '1' . chr(9) . $fejl;
    } else {
        transaktion('commit');
    }
    $linje = "formularprint({$ordre_id},'4','1',{$charset},'email')";
    fwrite($fp, $linje . "\n");
    $svar = formularprint($ordre_id, '4', '1', $charset, 'email');
    fwrite($fp, $linje . "Svar " . $svar . "\n");
    if ($svar && $svar != 'OK') {
        return '1' . chr(9) . $svar;
    } else {
        fclose($fp);
        return '0' . chr(9) . $ordre_id;
    }
}
$server = new SoapServer("invoice.wsdl");
$server->addFunction("invoice");
$server->handle();
    $res = 1;
    if ($res !== 1) {
        $ret->status = 9;
        $ret->Message = "パスワード変更に失敗しました。";
        return $ret;
    }
    $ret->status = 0;
    return $ret;
}
/*
$ary = array();
$ary['staffcode'] = '01234567';
$ary['password'] = '******';

$ret = Authenticate($ary);
var_dump($ret);
exit;
*/
/**
 * SOAPサーバオブジェクトの作成
 */
$server = new SoapServer(null, array('uri' => 'http://10.1.2.17/soap/'));
//$server = new SoapServer(null, array('uri' => 'http://10.1.2.16/soap/'));
/**
 * サービスの追加
 */
$server->addFunction(array("Authenticate", "ChangePassword"));
/**
 * サービスを実行
 */
$server->handle();
Example #15
0
    public $var1;
}
class CT_A2 extends CT_A1
{
    public $var2;
}
class CT_A3 extends CT_A2
{
    public $var3;
}
// returns A2 in WSDL
function test($a1)
{
    $a3 = new CT_A3();
    $a3->var1 = $a1->var1;
    $a3->var2 = "var two";
    $a3->var3 = "var three";
    return $a3;
}
$classMap = array("A1" => "CT_A1", "A2" => "CT_A2", "A3" => "CT_A3");
$client = new SoapClient(dirname(__FILE__) . "/bug36575.wsdl", array("trace" => 1, "exceptions" => 0, "classmap" => $classMap));
$a2 = new CT_A2();
$a2->var1 = "one";
$a2->var2 = "two";
$client->test($a2);
$soapRequest = $client->__getLastRequest();
echo $soapRequest;
$server = new SoapServer(dirname(__FILE__) . "/bug36575.wsdl", array("classmap" => $classMap));
$server->addFunction("test");
$server->handle($soapRequest);
echo "ok\n";
 * Authors: Christian Paminger <*****@*****.**>,
 *          Andreas Oesterreicher <*****@*****.**> and
 *          Karl Burkhart <*****@*****.**>.
 */
header("Cache-Control: no-cache");
header("Cache-Control: post-check=0, pre-check=0", false);
header("Expires Mon, 26 Jul 1997 05:00:00 GMT");
header("Pragma: no-cache");
require_once '../config/vilesci.config.inc.php';
require_once '../include/basis_db.class.php';
require_once '../include/ressource.class.php';
require_once '../include/datum.class.php';
require_once '../include/functions.inc.php';
require_once '../include/benutzerberechtigung.class.php';
$SOAPServer = new SoapServer(APP_ROOT . "/soap/ressource_projekt.wsdl.php?" . microtime());
$SOAPServer->addFunction("saveProjektRessource");
$SOAPServer->addFunction("deleteProjektRessource");
$SOAPServer->handle();
// WSDL Chache auf aus
ini_set("soap.wsdl_cache_enabled", "0");
/**
 * 
 * Speichert in der Zwischentabelle Ressource - Projekt
 * @param $username
 * @param $passwort
 * @param $projektRessource
 */
function saveProjektRessource($username, $passwort, $projektRessource)
{
    if (!($user = check_user($username, $passwort))) {
        return new SoapFault("Server", "Invalid Credentials");
Example #17
0
    if ($error = mysql_error($con)) {
        if ($debug) {
            $log = getdate();
            $log['message'] = $error;
            file_put_contents("error.log", print_r($log, true), FILE_APPEND);
        }
        throw new SoapFault("RQ-3", $error);
    }
    $data = array();
    while ($row = mysql_fetch_assoc($res)) {
        $data[] = $row;
    }
    if ($debug) {
        $log = getdate();
        $log['message'] = $data;
        file_put_contents("result.log", print_r($log, true), FILE_APPEND);
        $log = getdate();
        $log['message'] = mysql_error($con);
        file_put_contents("error.log", print_r($log, true), FILE_APPEND);
    }
    mysql_close($con);
    return $data;
}
function test()
{
    return "halo";
}
$server = new SoapServer(null, array('uri' => "http://php_mysql_bridge/"));
$server->addFunction('run_query');
$server->addFunction('test');
$server->handle();
Example #18
0
<?php

ini_set("soap.wsdl_cache_enabled", "0");
require_once "lib/googleVoice.php";
require_once "settings.php";
$server = new SoapServer("xml/oms.wsdl");
$server->addFunction("GetServiceInfo");
$server->addFunction("GetUserInfo");
$server->addFunction("DeliverXms");
$server->addFunction("SendXms");
$server->handle();
function load_xml($file)
{
    ob_start();
    include $file;
    $return = ob_get_contents();
    ob_end_clean();
    return $return;
}
function GetServiceInfo()
{
    global $soap;
    $soap = TRUE;
    return array("GetServiceInfoResult" => load_xml("xml/serviceInfo.xml"));
}
function GetUserInfo($complex)
{
    global $soap;
    $soap = TRUE;
    $xmsUser = $complex->xmsUser;
    $xmsUser = str_replace("UTF-16", "UTF-8", $xmsUser);
Example #19
0
require_once '../config/vilesci.config.inc.php';
require_once '../config/global.config.inc.php';
require_once '../include/basis_db.class.php';
require_once '../include/prestudent.class.php';
require_once '../include/student.class.php';
require_once '../include/konto.class.php';
require_once '../include/datum.class.php';
require_once '../include/benutzer.class.php';
require_once '../include/webservicelog.class.php';
require_once '../include/mail.class.php';
require_once '../include/abschlusspruefung.class.php';
require_once '../include/note.class.php';
require_once 'stip.class.php';
ini_set("soap.wsdl_cache_enabled", "0");
$SOAPServer = new SoapServer(APP_ROOT . "/soap/stip.wsdl.php?" . microtime());
$SOAPServer->addFunction("GetStipendienbezieherStip");
$SOAPServer->addFunction("SendStipendienbezieherStipError");
$SOAPServer->handle();
/**
 * 
 * Funktion nimmt Anfragen entgegen und bearbeitet diese
 * @param $parameters -> XML SOAP File
 */
function GetStipendienbezieherStip($parameters)
{
    $anfrageDaten = $parameters->anfrageDaten;
    $Stipendiumsbezieher = $anfrageDaten->Stipendiumsbezieher;
    $ErhalterKz = $anfrageDaten->ErhKz;
    $AnfrageDatenID = $anfrageDaten->AnfragedatenID;
    // Eintrag in der LogTabelle anlegen
    $log = new webservicelog();
Example #20
0
<?php

define('WSDL', dirname(__FILE__) . "/bug66112.wsdl");
function Mist($p)
{
    $client = new soapclient(WSDL, array('typemap' => array(array("type_ns" => "uri:mist", "type_name" => "A"))));
    try {
        $client->Mist(array("XX" => "xx"));
    } catch (SoapFault $x) {
    }
    return array("A" => "ABC", "B" => "sss");
}
$s = new SoapServer(WSDL, array('typemap' => array(array("type_ns" => "uri:mist", "type_name" => "A"))));
$s->addFunction("Mist");
$_SERVER["REQUEST_METHOD"] = "POST";
$HTTP_RAW_POST_DATA = <<<EOF
<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:uri="uri:mist">
   <soapenv:Header/>
   <soapenv:Body>
      <uri:Request><uri:A>XXX</uri:A><uri:B>yyy</uri:B></uri:Request>
   </soapenv:Body>
</soapenv:Envelope>
EOF;
$s->handle($HTTP_RAW_POST_DATA);
echo "OK\n";
Example #21
0
function sendUserData($x, $y)
{
    $dir = "/var/www/phplib/hiscsv";
    $aryFile = array();
    if ($handle = opendir($dir)) {
        $key = 0;
        while (false !== ($entry = readdir($handle))) {
            if ($entry != "." && $entry != "..") {
                $aryFile[$key]['file_name'] = $entry;
                $aryFile[$key]['file_data'] = file_get_contents($dir . "/" . $entry);
                unlink($dir . "/" . $entry);
                $key++;
            }
        }
        closedir($handle);
    }
    return $aryFile;
}
/**
 * SOAPサーバオブジェクトの作成
 */
$server = new SoapServer(null, array('uri' => 'http://10.1.2.17/soap/'));
//$server = new SoapServer(null, array('uri' => 'http://10.1.2.16/soap/'));
/**
 * サービスの追加
 */
$server->addFunction('sendUserData');
/**
 * サービスを実行
 */
$server->handle();
Example #22
0
    require_once "include/inc.header.php";
    global $ilAuth;
    // Logout out user from application
    // Destroy application session/cookie etc
    $ilAuth->logout();
    // Finally, send user to the return URL
    ilUtil::redirect($_GET['return']);
} elseif (!empty($HTTP_RAW_POST_DATA)) {
    include_once "Services/Context/classes/class.ilContext.php";
    ilContext::init(ilContext::CONTEXT_SOAP);
    // Load ILIAS libraries and initialise ILIAS in non-web context
    require_once "Services/Init/classes/class.ilInitialisation.php";
    ilInitialisation::initILIAS();
    // Set SOAP header
    $server = new SoapServer('https://' . $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF'] . '/LogoutNotification.wsdl');
    $server->addFunction("LogoutNotification");
    $server->handle();
} else {
    header('Content-Type: text/xml');
    echo <<<WSDL
<?xml version ="1.0" encoding ="UTF-8" ?>
<definitions name="LogoutNotification"
  targetNamespace="urn:mace:shibboleth:2.0:sp:notify"
  xmlns:notify="urn:mace:shibboleth:2.0:sp:notify"
  xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
  xmlns="http://schemas.xmlsoap.org/wsdl/">

\t<types>
\t   <schema targetNamespace="urn:mace:shibboleth:2.0:sp:notify"
\t\t   xmlns="http://www.w3.org/2000/10/XMLSchema"
\t\t   xmlns:notify="urn:mace:shibboleth:2.0:sp:notify">
Example #23
0
    #	include("../includes/select.php");
    include "../includes/connect.php";
    include "../includes/online.php";
    $linje = NULL;
    $tabels = array('grupper', 'varianter', 'variant_typer', 'shop_ordrer', 'shop_varer', 'adresser', 'shop_adresser');
    $singleupdate = str_replace($s_id, "", $string);
    $singleupdate = str_replace(chr(9), "", $singleupdate);
    $singleupdate = str_replace(chr(10), "", $singleupdate);
    $singleupdate = str_replace(chr(13), "", $singleupdate);
    #	$singleupdate=str_replace(" ","",$singleupdate);
    $singleupdate = strtolower($singleupdate);
    list($table, $tmp) = explode("set", $singleupdate, 2);
    $table = trim($table);
    #if ($table!='adresser')	return('1'.chr(9).$table);
    if (!in_array($table, $tabels)) {
        return '1' . chr(9) . 'Updating ' . $table . ' is not accepted';
    }
    #if ($table!='adresser')	return('1'.chr(9).$svar.":".$singleupdate);
    transaktion('begin');
    $svar = db_modify("update {$table} {$singleupdate}", __FILE__ . " linje " . __LINE__);
    list($fejl, $svar) = explode(chr(9), $svar);
    if ($fejl) {
        return $fejl . chr(9) . $svar;
    } else {
        transaktion('commit');
        return '0' . chr(9) . $id;
    }
}
$server = new SoapServer("singleupdate.wsdl");
$server->addFunction("singleupdate");
$server->handle();
Example #24
0
<?php

require 'inventory_functions.php';
ini_set("soap.wsdl_cache_enabled", "0");
// disabling WSDL cache
$server = new SoapServer("sum.wsdl");
//$server->addFunction("getItemCount");
$server->addFunction("getSum");
$server->handle();
Example #25
0
<?php

function hello($someone)
{
    $db_id = mysql_connect("localhost", "web1162", "bX2KARTc");
    if (!§db_id) {
        die("Verbindungsaufbau ist gescheitert");
    }
    // mysql_query("use usr_web_1162_3");
    $db_sel = mysql_select_db("usr_web1162_3", $db_id);
    if (!$db_sel) {
        die('Kann Datenbank nicht benutzen : ' . mysql_error());
    }
    $retval[2];
    $retval[0] = "";
    $retval[1] = "";
    mysql_query("SET names 'utf8'");
    mysql_query("SET character_set_results = 'utf8', character_set_client = 'utf8', character_set_connection = 'utf8', character_set_database = 'utf8', character_set_server = 'utf8'", $db_id);
    $query = "select * from `usertable` where `name`like '" . $someone . "%';";
    $result = mysql_query($query);
    if (mysql_num_rows($result) >= 1) {
        while ($aktZeile = mysql_fetch_assoc($result)) {
            $retval[1] = $aktZeile['email'] . " " . $retval[1];
        }
    }
    $retval[0] = "Hello Du " . $someone . "!";
    return $retval;
}
$server = new SoapServer(null, array('uri' => "http://localhost"));
$server->addFunction("hello");
$server->handle();
Example #26
0
<?php

include_once dirname(__FILE__) . '/../inc/settings.inc.php';
function cacheTorrent($torrent)
{
    $torrent = base64_decode($torrent);
    $fp = tempnam('/tmp', 'soapApi');
    file_put_contents($fp, $torrent);
    $toReturn = handle_upload($fp);
    unlink($fp);
    return $toReturn;
}
ini_set('soap.wsdl_cache_enabled', '0');
// disabling WSDL cache
$server = new SoapServer('torrage.wsdl');
$server->addFunction('cacheTorrent');
$server->handle();
Example #27
0
    foreach ($request->customFieldRequest->fields->CustomField as $field) {
        $fields[$field->name] = $field->value;
    }
    foreach ($truefields as $rf) {
        if ($fields[$rf] != "true") {
            $response->response = '[invalid]';
            $invalidField = new CustomField();
            $invalidField->name = $rf;
            $invalidField->value = "customField.error." . $rf;
            $output .= var_export($invalidField, true);
            array_push($response->fields, $invalidField);
        }
    }
    $output .= var_export($fields, true);
    $output .= var_export($response, true);
    if ($response->response == '[invalid]') {
        fprintf($fp, '%s', "BEGIN\n" . $output . "\nEND\n");
        return array("customFieldResponse" => $response);
    }
    return array("customFieldResponse" => $response);
}
$classmap = array('customFieldRequest' => 'CustomFieldRequest', 'customFieldResponse' => 'CustomFieldResponse', 'CustomField' => 'CustomField');
# Use a locally cached version of the CustomFields.wsdl to guarantee service uptime
# However, CustomFields.wsdl should be regularly updated from here:
#    https://pal-live.adyen.com/pal/CustomFields.wsdl
$server = new SoapServer("CustomFields.wsdl", array('classmap' => $classmap));
$server->addFunction("check");
$server->handle();
?>
 
Example #28
0
 *          Andreas Oesterreicher <*****@*****.**> and
 *          Karl Burkhart <*****@*****.**>.
 */
header("Cache-Control: no-cache");
header("Cache-Control: post-check=0, pre-check=0", false);
header("Expires Mon, 26 Jul 1997 05:00:00 GMT");
header("Pragma: no-cache");
session_start();
require_once '../config/vilesci.config.inc.php';
require_once '../include/notiz.class.php';
require_once '../include/datum.class.php';
require_once '../include/functions.inc.php';
require_once '../include/benutzerberechtigung.class.php';
require_once '../include/dms.class.php';
$SOAPServer = new SoapServer(APP_ROOT . "/soap/notiz.wsdl.php?" . microtime());
$SOAPServer->addFunction("saveNotiz");
$SOAPServer->addFunction("deleteNotiz");
$SOAPServer->addFunction("deleteDokument");
$SOAPServer->addFunction("setErledigt");
$SOAPServer->handle();
// WSDL Chache auf aus
ini_set("soap.wsdl_cache_enabled", "0");
/**
 * 
 * Speichert Notizen in die Datenbank
 * 
 * @param string $username
 * @param string $passwort
 * @param complextype $notiz
 */
function saveNotiz($username, $passwort, $notiz)
Example #29
0
 /**
  * Get SoapServer object
  *
  * Uses {@link $_wsdl} and return value of {@link getOptions()} to instantiate
  * SoapServer object, and then registers any functions or class with it, as
  * well as peristence.
  *
  * @return SoapServer
  */
 protected function _getSoap()
 {
     $options = $this->getOptions();
     $server = new SoapServer($this->_wsdl, $options);
     if (!empty($this->_functions)) {
         $server->addFunction($this->_functions);
     }
     if (!empty($this->_class)) {
         $args = $this->_classArgs;
         array_unshift($args, $this->_class);
         call_user_func_array(array($server, 'setClass'), $args);
     }
     if (!empty($this->_object)) {
         $server->setObject($this->_object);
     }
     if (null !== $this->_persistence) {
         $server->setPersistence($this->_persistence);
     }
     return $server;
 }
Example #30
0
}
if ($_SERVER["REQUEST_METHOD"] == "GET") {
    $myurl = "http://" . $_SERVER["SERVER_NAME"] . $_SERVER["SCRIPT_NAME"];
    if (isset($_GET["wsdl"])) {
        header("Content-type: text/xml; charset=utf-8");
        echo str_replace("@@__URL__@@", $myurl, file_get_contents("ObjectsService.wsdl"));
    } else {
        if (isset($_GET["service-source"])) {
            header("Content-type: text/plain; charset=utf-8");
            header("Content-disposition: attachment; filename=service.php");
            echo file_get_contents(__FILE__);
        } else {
            if (isset($_GET["client-source"])) {
                header("Content-type: text/plain; charset=utf-8");
                header("Content-disposition: attachment; filename=client.php");
                echo file_get_contents(str_replace("-ws.php", "-cli.php", __FILE__));
            } else {
                header("Content-type: text/plain; charset=utf-8");
                echo "This is HTTP SOAP ObjectsService web service.\r\n" . "See " . $myurl . "?wsdl";
            }
        }
    }
} else {
    ini_set("error_reporting", false);
    $server = new SoapServer("ObjectsService.wsdl");
    $server->addFunction("GetUserById");
    $server->addFunction("SaveUserData");
    $server->addFunction("CopyUserProfile");
    $server->addFunction("ListProperties");
    $server->handle();
}