Beispiel #1
0
 /**
  * Obtiene todas funciones disponibles en el servicio web
  */
 function getFunctions()
 {
     $arrayFunctions = $this->proxySoap->__getFunctions();
     for ($i = 0; $i < 64; $i++) {
         print $arrayFunctions[$i];
         echo '<br>';
     }
 }
Beispiel #2
0
class soap
{
    var $client;
    function __construct()
    {
        $this->client = new SoapClient("http://erp-prd.ifobl.if.energy.gov.ua:8000/sap/bc/srt/wsdl/bndg_E3581699EA116CF1AF0D005056C00008/wsdl11/allinone/standard/document?sap-client=500", array('login' => 'ws_user', 'password' => 'Web-serv1ces', 'trace' => true));
    }
    // пошук серед всіх працівників (json)
    function search_client($prizv, $tab)
    {
        $rez = array('LastnameM' => $prizv, 'EmployeeId' => $tab, 'OutTab' => array());
        $rezult = $this->client->ZsearchPerson($rez);
        if (count($rezult->OutTab->item) == '') {
            echo json_encode(array());
        }
        if (count($rezult->OutTab->item) == 1) {
            //echo '['.json_encode($rezult->OutTab->item).']';
            $json = json_encode($rezult->OutTab->item);
            echo '[' . str_replace("0000", "", $json) . ']';
        }
        if (count($rezult->OutTab->item) > 1) {
            //echo json_encode($rezult->OutTab->item);
            $json = json_encode($rezult->OutTab->item);
            echo str_replace("0000", "", $json);
        }
    }
}
$object = new soap();
if ($_POST['task'] == "search_user") {
    $object->search_client($_POST['user'] . "*", '');
}
//============================================================+
// File name   : tce_page_weather.php
// Begin       : 2010-10-07
// Last Update : 2010-10-08
//
// Description : Display weather
//
// Author: LV Xinyan
//
//============================================================+
/**
 * @file
 * Display weather.
 * @package com.tecnick.tcexam.shared
 * @author LV Xinyan
 * @since 2010-10-07
 */
require_once "tce_class_soap.php";
$sms = new soap();
$header = null;
$elements = array('theCityName' => '上海');
$sms->setSoap("http://www.webxml.com.cn/WebServices/WeatherWebService.asmx?WSDL", $header, $elements, "getWeatherbyCityName", "getWeatherbyCityNameResult");
$r = $sms->callSoap();
if ($r) {
    echo '<div style="margin-top:-4px;">' . K_NEWLINE;
    echo '<span style="color:#fff" title="' . $r->string[13] . $r->string[12] . '">' . $r->string[1] . ' - ' . $r->string[6] . '<img src="../../images/weather/' . $r->string[8] . '" alt=""/>' . $r->string[5] . '</span>' . K_NEWLINE;
    echo '</div>' . K_NEWLINE;
}
//============================================================+
// END OF FILE
//============================================================+