当前位置: 首页>>代码示例>>PHP>>正文


PHP nusoap_server类代码示例

本文整理汇总了PHP中nusoap_server的典型用法代码示例。如果您正苦于以下问题:PHP nusoap_server类的具体用法?PHP nusoap_server怎么用?PHP nusoap_server使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了nusoap_server类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: initSoapRequest

function initSoapRequest($namespace, $nsurl)
{
    global $nuserver, $HTTP_RAW_POST_DATA;
    if (!$HTTP_RAW_POST_DATA) {
        $HTTP_RAW_POST_DATA = file_get_contents('php://input');
    }
    $nuserver = new nusoap_server();
    $nuserver->configureWSDL($namespace, $nsurl);
    $nuserver->wsdl->schemaTargetNamespace = $nsurl;
    /*
    	Define string und integer-arrays
    */
    $nuserver->wsdl->addComplexType('ArrayOfstring', 'complexType', 'array', '', 'SOAP-ENC:Array', array(), array(array('ref' => 'SOAP-ENC:arrayType', 'wsdl:arrayType' => 'xsd:string[]')), 'xsd:string');
    $nuserver->wsdl->addComplexType('ArrayOfint', 'complexType', 'array', '', 'SOAP-ENC:Array', array(), array(array('ref' => 'SOAP-ENC:arrayType', 'wsdl:arrayType' => 'xsd:int[]')), 'xsd:int');
}
开发者ID:RH-Code,项目名称:opencaching,代码行数:15,代码来源:nusoap.inc.php

示例2: Ini

 (at your option) any later version.

 This program is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 GNU General Public License for more details.

 You should have received a copy of the GNU General Public License
 along with this program.  If not, see <http://www.gnu.org/licenses/>.
*/
if (!isset($ini)) {
    require_once '../model/Ini.php';
    $ini = new Ini();
}
require_once Ini::$internal_path . "lib/nusoap/nusoap.php";
$server = new nusoap_server();
$server->configureWSDL('ConcertoClientWSDL', 'urn:ConcertoClientWSDL');
$server->register('query', array('query' => 'xsd:string', 'post' => 'xsd:string'), array('result' => 'xsd:string'), 'urn:ConcertoClientWSDL', 'urn:ConcertoClientWSDL#query', 'rpc', 'encoded', 'Executes query.');
function curl_post($query, $post)
{
    $post_fields = "";
    foreach ($post as $k => $v) {
        if ($post_fields != "") {
            $post_fields .= "&";
        }
        $post_fields .= $k . "=" . urlencode($v);
    }
    $ch = curl_init();
    curl_setopt($ch, CURLOPT_URL, Ini::$external_path . $query);
    curl_setopt($ch, CURLOPT_HEADER, 0);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
开发者ID:Abuamany,项目名称:concerto-platform,代码行数:31,代码来源:ws_server.php

示例3: dol_syslog

// Include SOAP
require_once DOL_DOCUMENT_ROOT . "/core/lib/ws.lib.php";
require_once DOL_DOCUMENT_ROOT . "/comm/action/class/actioncomm.class.php";
require_once DOL_DOCUMENT_ROOT . "/comm/action/class/cactioncomm.class.php";
require_once DOL_DOCUMENT_ROOT . '/core/class/extrafields.class.php';
dol_syslog("Call ActionComm webservices interfaces");
// Enable and test if module web services is enabled
if (empty($conf->global->MAIN_MODULE_WEBSERVICES)) {
    $langs->load("admin");
    dol_syslog("Call Dolibarr webservices interfaces with module webservices disabled");
    print $langs->trans("WarningModuleNotActive", 'WebServices') . '.<br><br>';
    print $langs->trans("ToActivateModule");
    exit;
}
// Create the soap Object
$server = new nusoap_server();
$server->soap_defencoding = 'UTF-8';
$server->decode_utf8 = false;
$ns = 'http://www.dolibarr.org/ns/';
$server->configureWSDL('WebServicesDolibarrActionComm', $ns);
$server->wsdl->schemaTargetNamespace = $ns;
// Define WSDL Authentication object
$server->wsdl->addComplexType('authentication', 'complexType', 'struct', 'all', '', array('dolibarrkey' => array('name' => 'dolibarrkey', 'type' => 'xsd:string'), 'sourceapplication' => array('name' => 'sourceapplication', 'type' => 'xsd:string'), 'login' => array('name' => 'login', 'type' => 'xsd:string'), 'password' => array('name' => 'password', 'type' => 'xsd:string'), 'entity' => array('name' => 'entity', 'type' => 'xsd:string')));
// Define WSDL Return object
$server->wsdl->addComplexType('result', 'complexType', 'struct', 'all', '', array('result_code' => array('name' => 'result_code', 'type' => 'xsd:string'), 'result_label' => array('name' => 'result_label', 'type' => 'xsd:string')));
$actioncomm_fields = array('id' => array('name' => 'id', 'type' => 'xsd:string'), 'ref' => array('name' => 'ref', 'type' => 'xsd:string'), 'ref_ext' => array('name' => 'ref_ext', 'type' => 'xsd:string'), 'type_id' => array('name' => 'type_id', 'type' => 'xsd:string'), 'type_code' => array('name' => 'type_code', 'type' => 'xsd:string'), 'type' => array('name' => 'type', 'type' => 'xsd:string'), 'label' => array('name' => 'label', 'type' => 'xsd:string'), 'datep' => array('name' => 'datep', 'type' => 'xsd:dateTime'), 'datef' => array('name' => 'datef', 'type' => 'xsd:dateTime'), 'datec' => array('name' => 'datec', 'type' => 'xsd:dateTime'), 'datem' => array('name' => 'datem', 'type' => 'xsd:dateTime'), 'note' => array('name' => 'note', 'type' => 'xsd:string'), 'percentage' => array('name' => 'percentage', 'type' => 'xsd:string'), 'author' => array('name' => 'author', 'type' => 'xsd:string'), 'usermod' => array('name' => 'usermod', 'type' => 'xsd:string'), 'usertodo' => array('name' => 'usertodo', 'type' => 'xsd:string'), 'userdone' => array('name' => 'userdone', 'type' => 'xsd:string'), 'priority' => array('name' => 'priority', 'type' => 'xsd:string'), 'fulldayevent' => array('name' => 'fulldayevent', 'type' => 'xsd:string'), 'location' => array('name' => 'location', 'type' => 'xsd:string'), 'socid' => array('name' => 'socid', 'type' => 'xsd:string'), 'contactid' => array('name' => 'contactid', 'type' => 'xsd:string'), 'projectid' => array('name' => 'projectid', 'type' => 'xsd:string'), 'fk_element' => array('name' => 'fk_element', 'type' => 'xsd:string'), 'elementtype' => array('name' => 'elementtype', 'type' => 'xsd:string'));
//Retreive all extrafield for actioncomm
// fetch optionals attributes and labels
$extrafields = new ExtraFields($db);
$extralabels = $extrafields->fetch_name_optionals_label('actioncomm', true);
if (count($extrafields) > 0) {
开发者ID:LionSystemsSolutions,项目名称:El-Canelo-ERP,代码行数:31,代码来源:server_actioncomm.php

示例4: ConfigManager

<?php

require_once 'lib/nusoap.php';
require_once "controller/ConfigManager.php";
$ConfigManager = new ConfigManager();
$elementNamespace = $ConfigManager->getElementNamespace();
$server = new nusoap_server();
// Create server instance
$server->configureWSDL('gecredws', $elementNamespace);
$server->register('login', array("username" => "xsd:string", "password" => "xsd:string"), array("result" => "xsd:string"), $elementNamespace);
$server->register('version', array("param" => "xsd:string"), array("result" => "xsd:string"), $elementNamespace);
function login($username, $password)
{
    require_once "controller/LoginController.php";
    $LoginController = new LoginController();
    return $LoginController->login($username, $password);
}
function version()
{
    require_once "controller/ConfigManager.php";
    $ConfigManager = new ConfigManager();
    return $ConfigManager->getVersione();
}
// Use the request to (try to) invoke the service
$HTTP_RAW_POST_DATA = isset($HTTP_RAW_POST_DATA) ? $HTTP_RAW_POST_DATA : '';
$server->service($HTTP_RAW_POST_DATA);
开发者ID:sergiobelli,项目名称:gecred,代码行数:26,代码来源:server.php

示例5: nusoap_server

<?php

require_once "CPath_class.php";
require_once 'nusoap.php';
$debug = 1;
$server = new nusoap_server();
$server->register('CPath.getInterface');
$server->register('CPath.processData');
$server->register('CPath.getPath');
$server->register('CPath.getName');
//Вот кто поймет что здесь написанно ТОМУ ПРИЗ!!!!!!!!!!!!
$HTTP_RAW_POST_DATA = isset($HTTP_RAW_POST_DATA) ? $HTTP_RAW_POST_DATA : '';
$server->service($HTTP_RAW_POST_DATA);
开发者ID:netflixmedia,项目名称:igtfca,代码行数:13,代码来源:CPathSoapServer.php

示例6: nusoap_server

<?php

require_once 'lib/nusoap.php';
$server = new nusoap_server();
$server->configureWSDL('server.exemplo', 'http://retamero.com.br/webservice');
$server->wsdl->schemaTargetNamespace = 'http://retamero.com.br/webservice';
$server->register('exemplo', array('id' => 'xsd:string'), array('retorno' => 'xsd:string'), 'http://retamero.com.br/webservice', 'http://retamero.com.br/webservice/exemplo', 'rpc', 'encoded', 'Apenas um exemplo utilizando o NuSOAP PHP.');
$server->register('update', array('id' => 'xsd:string', 'json' => 'xsd:string'), array('retorno' => 'xsd:string'), 'http://retamero.com.br/webservice', 'http://retamero.com.br/webservice/update', 'rpc', 'encoded', 'Apenas um exemplo utilizando o NuSOAP PHP.');
function exemplo($id)
{
    $conecta = mysql_connect("localhost", "user", "senha") or print mysql_error();
    mysql_select_db("retamero_academia", $conecta) or print mysql_error();
    $sql = "SELECT * FROM medidas WHERE aluno_id = " . $id;
    $result = mysql_query($sql, $conecta);
    //while($consulta = mysql_fetch_array($result)) { //pega indice valor e nome do campo e valor
    while ($consulta = mysql_fetch_assoc($result)) {
        // pega apenas nome do campo e valor
        $retorno = json_encode($consulta);
    }
    mysql_free_result($result);
    mysql_close($conecta);
    if ($retorno == "") {
        $retorno = "{\"id\":\"vazio\"}";
    }
    return $retorno;
}
function update($id, $json)
{
    $decodificado = json_decode($json, true);
    $conecta = mysql_connect("localhost", "user", "senha") or print mysql_error();
    mysql_select_db("retamero_academia", $conecta) or print mysql_error();
开发者ID:Retamero,项目名称:KsoapNusoap,代码行数:31,代码来源:server.php

示例7: dol_syslog

dol_syslog("Call Dolibarr webservices interfaces");

$langs->load("main");

// Enable and test if module web services is enabled
if (empty($conf->global->MAIN_MODULE_WEBSERVICES))
{
	$langs->load("admin");
	dol_syslog("Call Dolibarr webservices interfaces with module webservices disabled");
	print $langs->trans("WarningModuleNotActive",'WebServices').'.<br><br>';
	print $langs->trans("ToActivateModule");
	exit;
}

// Create the soap Object
$server = new nusoap_server();
$server->soap_defencoding='UTF-8';
$server->decode_utf8=false;
$ns='http://www.dolibarr.org/ns/';
$server->configureWSDL('WebServicesDolibarrSupplierInvoice',$ns);
$server->wsdl->schemaTargetNamespace=$ns;


// Define WSDL Authentication object
$server->wsdl->addComplexType(
    'authentication',
    'complexType',
    'struct',
    'all',
    '',
    array(
开发者ID:nrjacker4,项目名称:crm-php,代码行数:31,代码来源:server_supplier_invoice.php

示例8: dol_syslog

require_once "../master.inc.php";
require_once NUSOAP_PATH . '/nusoap.php';
// Include SOAP
require_once DOL_DOCUMENT_ROOT . '/core/lib/ws.lib.php';
require_once DOL_DOCUMENT_ROOT . "/categories/class/categorie.class.php";
dol_syslog("Call Dolibarr webservices interfaces");
// Enable and test if module web services is enabled
if (empty($conf->global->MAIN_MODULE_WEBSERVICES)) {
    $langs->load("admin");
    dol_syslog("Call Dolibarr webservices interfaces with module webservices disabled");
    print $langs->trans("WarningModuleNotActive", 'WebServices') . '.<br><br>';
    print $langs->trans("ToActivateModule");
    exit;
}
// Create the soap Object
$server = new nusoap_server();
$server->soap_defencoding = 'UTF-8';
$server->decode_utf8 = false;
$ns = 'http://www.dolibarr.org/ns/';
$server->configureWSDL('WebServicesDolibarrCategorie', $ns);
$server->wsdl->schemaTargetNamespace = $ns;
// Define WSDL content
$server->wsdl->addComplexType('authentication', 'complexType', 'struct', 'all', '', array('dolibarrkey' => array('name' => 'dolibarrkey', 'type' => 'xsd:string'), 'sourceapplication' => array('name' => 'sourceapplication', 'type' => 'xsd:string'), 'login' => array('name' => 'login', 'type' => 'xsd:string'), 'password' => array('name' => 'password', 'type' => 'xsd:string'), 'entity' => array('name' => 'entity', 'type' => 'xsd:string')));
/*
 * Une catégorie
 */
$server->wsdl->addComplexType('categorie', 'complexType', 'struct', 'all', '', array('id' => array('name' => 'id', 'type' => 'xsd:string'), 'id_mere' => array('name' => 'id_mere', 'type' => 'xsd:string'), 'label' => array('name' => 'label', 'type' => 'xsd:string'), 'description' => array('name' => 'description', 'type' => 'xsd:string'), 'socid' => array('name' => 'socid', 'type' => 'xsd:string'), 'type' => array('name' => 'type', 'type' => 'xsd:string'), 'visible' => array('name' => 'visible', 'type' => 'xsd:string'), 'dir' => array('name' => 'dir', 'type' => 'xsd:string'), 'photos' => array('name' => 'photos', 'type' => 'tns:PhotosArray'), 'filles' => array('name' => 'filles', 'type' => 'tns:FillesArray')));
/*
 * Les catégories filles, sous tableau dez la catégorie
 */
$server->wsdl->addComplexType('FillesArray', 'complexType', 'array', '', 'SOAP-ENC:Array', array(), array(array('ref' => 'SOAP-ENC:arrayType', 'wsdl:arrayType' => 'tns:categorie[]')), 'tns:categorie');
开发者ID:Samara94,项目名称:dolibarr,代码行数:31,代码来源:server_category.php

示例9: dol_syslog

require_once NUSOAP_PATH . '/nusoap.php';
// Include SOAP
require_once DOL_DOCUMENT_ROOT . "/core/lib/ws.lib.php";
require_once DOL_DOCUMENT_ROOT . "/contact/class/contact.class.php";
require_once DOL_DOCUMENT_ROOT . '/core/class/extrafields.class.php';
dol_syslog("Call Contact webservices interfaces");
// Enable and test if module web services is enabled
if (empty($conf->global->MAIN_MODULE_WEBSERVICES)) {
    $langs->load("admin");
    dol_syslog("Call Dolibarr webservices interfaces with module webservices disabled");
    print $langs->trans("WarningModuleNotActive", 'WebServices') . '.<br><br>';
    print $langs->trans("ToActivateModule");
    exit;
}
// Create the soap Object
$server = new nusoap_server();
$server->soap_defencoding = 'UTF-8';
$server->decode_utf8 = false;
$ns = 'http://www.dolibarr.org/ns/';
$server->configureWSDL('WebServicesDolibarrContact', $ns);
$server->wsdl->schemaTargetNamespace = $ns;
// Define WSDL Authentication object
$server->wsdl->addComplexType('authentication', 'complexType', 'struct', 'all', '', array('dolibarrkey' => array('name' => 'dolibarrkey', 'type' => 'xsd:string'), 'sourceapplication' => array('name' => 'sourceapplication', 'type' => 'xsd:string'), 'login' => array('name' => 'login', 'type' => 'xsd:string'), 'password' => array('name' => 'password', 'type' => 'xsd:string'), 'entity' => array('name' => 'entity', 'type' => 'xsd:string')));
// Define WSDL Return object
$server->wsdl->addComplexType('result', 'complexType', 'struct', 'all', '', array('result_code' => array('name' => 'result_code', 'type' => 'xsd:string'), 'result_label' => array('name' => 'result_label', 'type' => 'xsd:string')));
$contact_fields = array('id' => array('name' => 'id', 'type' => 'xsd:string'), 'ref_ext' => array('name' => 'ref_ext', 'type' => 'xsd:string'), 'lastname' => array('name' => 'lastname', 'type' => 'xsd:string'), 'firstname' => array('name' => 'firstname', 'type' => 'xsd:string'), 'address' => array('name' => 'address', 'type' => 'xsd:string'), 'zip' => array('name' => 'zip', 'type' => 'xsd:string'), 'town' => array('name' => 'town', 'type' => 'xsd:string'), 'state_id' => array('name' => 'state_id', 'type' => 'xsd:string'), 'state_code' => array('name' => 'state_code', 'type' => 'xsd:string'), 'state' => array('name' => 'state', 'type' => 'xsd:string'), 'country_id' => array('name' => 'country_id', 'type' => 'xsd:string'), 'country_code' => array('name' => 'country_code', 'type' => 'xsd:string'), 'country' => array('name' => 'country', 'type' => 'xsd:string'), 'socid' => array('name' => 'socid', 'type' => 'xsd:string'), 'status' => array('name' => 'status', 'type' => 'xsd:string'), 'phone_pro' => array('name' => 'phone_pro', 'type' => 'xsd:string'), 'fax' => array('name' => 'fax', 'type' => 'xsd:string'), 'phone_perso' => array('name' => 'phone_perso', 'type' => 'xsd:string'), 'phone_mobile' => array('name' => 'phone_mobile', 'type' => 'xsd:string'), 'code' => array('name' => 'code', 'type' => 'xsd:string'), 'email' => array('name' => 'email', 'type' => 'xsd:string'), 'birthday' => array('name' => 'birthday', 'type' => 'xsd:string'), 'default_lang' => array('name' => 'default_lang', 'type' => 'xsd:string'), 'note' => array('name' => 'note', 'type' => 'xsd:string'), 'no_email' => array('name' => 'no_email', 'type' => 'xsd:string'), 'ref_facturation' => array('name' => 'ref_facturation', 'type' => 'xsd:string'), 'ref_contrat' => array('name' => 'ref_contrat', 'type' => 'xsd:string'), 'ref_commande' => array('name' => 'ref_commande', 'type' => 'xsd:string'), 'ref_propal' => array('name' => 'ref_propal', 'type' => 'xsd:string'), 'user_id' => array('name' => 'user_id', 'type' => 'xsd:string'), 'user_login' => array('name' => 'user_login', 'type' => 'xsd:string'), 'civility_id' => array('name' => 'civility_id', 'type' => 'xsd:string'), 'poste' => array('name' => 'poste', 'type' => 'xsd:string'), 'statut' => array('name' => 'statut', 'type' => 'xsd:string'));
//Retreive all extrafield for contact
// fetch optionals attributes and labels
$extrafields = new ExtraFields($db);
$extralabels = $extrafields->fetch_name_optionals_label('socpeople', true);
if (count($extrafields) > 0) {
开发者ID:ADDAdev,项目名称:Dolibarr,代码行数:31,代码来源:server_contact.php

示例10: define

 * @author Agung Harry Purnama
 */
/* Load bootstrap so we can get started */
// nothing todo for now
define('MUST_FROM_INDEX', 'SAMPLE_WS2011.2');
//load nusoap library
require 'lib/webi/nusoap.php';
//run ws server
if (!defined('MUST_FROM_INDEX')) {
    exit('Cannot access file directly');
}
//WS Configuration
define('WS_SIKP', 'BDS_SECURITY');
define('WS_NAMA_WSDL', 'WSDL_' . WS_SIKP . '.wsdl');
//Create WS Service Instance with WSDL
$ws_svr = new nusoap_server();
$ws_svr->soap_defencoding = 'UTF-8';
$ws_svr->configureWSDL(WS_SIKP, 'urn:' . WS_NAMA_WSDL);
function ws_proccess($search, $getParams, $controller, $postParams, $jsonItems, $start, $limit)
{
    $GLOBALS["Webi_PageTime"] = microtime(true);
    include 'lib/bootstrap.php';
    /* Load Webi Core */
    sys::import('webi.core');
    wbCore::init();
    $_GET['jsonItems'] = $jsonItems;
    if (!empty($getParams)) {
        $getParams =& wbUtil::jsonDecode($getParams);
    } else {
        $getParams = array();
    }
开发者ID:rayminami,项目名称:mpd-wp,代码行数:31,代码来源:wsdl.php

示例11: dol_syslog

require_once DOL_DOCUMENT_ROOT . '/core/lib/date.lib.php';
require_once DOL_DOCUMENT_ROOT . '/core/lib/ws.lib.php';
require_once DOL_DOCUMENT_ROOT . '/user/class/user.class.php';
require_once DOL_DOCUMENT_ROOT . '/compta/facture/class/facture.class.php';
dol_syslog("Call Dolibarr webservices interfaces");
$langs->load("main");
// Enable and test if module web services is enabled
if (empty($conf->global->MAIN_MODULE_WEBSERVICES)) {
    $langs->load("admin");
    dol_syslog("Call Dolibarr webservices interfaces with module webservices disabled");
    print $langs->trans("WarningModuleNotActive", 'WebServices') . '.<br><br>';
    print $langs->trans("ToActivateModule");
    exit;
}
// Create the soap Object
$server = new nusoap_server();
$server->soap_defencoding = 'UTF-8';
$server->decode_utf8 = false;
$ns = 'http://www.dolibarr.org/ns/';
$server->configureWSDL('WebServicesDolibarrInvoice', $ns);
$server->wsdl->schemaTargetNamespace = $ns;
// Define WSDL Authentication object
$server->wsdl->addComplexType('authentication', 'complexType', 'struct', 'all', '', array('dolibarrkey' => array('name' => 'dolibarrkey', 'type' => 'xsd:string'), 'sourceapplication' => array('name' => 'sourceapplication', 'type' => 'xsd:string'), 'login' => array('name' => 'login', 'type' => 'xsd:string'), 'password' => array('name' => 'password', 'type' => 'xsd:string'), 'entity' => array('name' => 'entity', 'type' => 'xsd:string')));
// Define WSDL Return object
$server->wsdl->addComplexType('result', 'complexType', 'struct', 'all', '', array('result_code' => array('name' => 'result_code', 'type' => 'xsd:string'), 'result_label' => array('name' => 'result_label', 'type' => 'xsd:string')));
// Define other specific objects
$server->wsdl->addComplexType('line', 'complexType', 'struct', 'all', '', array('id' => array('name' => 'id', 'type' => 'xsd:string'), 'type' => array('name' => 'type', 'type' => 'xsd:int'), 'desc' => array('name' => 'desc', 'type' => 'xsd:string'), 'vat_rate' => array('name' => 'vat_rate', 'type' => 'xsd:double'), 'qty' => array('name' => 'qty', 'type' => 'xsd:double'), 'unitprice' => array('name' => 'unitprice', 'type' => 'xsd:double'), 'total_net' => array('name' => 'total_net', 'type' => 'xsd:double'), 'total_vat' => array('name' => 'total_vat', 'type' => 'xsd:double'), 'total' => array('name' => 'total', 'type' => 'xsd:double'), 'date_start' => array('name' => 'date_start', 'type' => 'xsd:date'), 'date_end' => array('name' => 'date_end', 'type' => 'xsd:date'), 'product_id' => array('name' => 'product_id', 'type' => 'xsd:int'), 'product_ref' => array('name' => 'product_ref', 'type' => 'xsd:string'), 'product_label' => array('name' => 'product_label', 'type' => 'xsd:string'), 'product_desc' => array('name' => 'product_desc', 'type' => 'xsd:string')));
/*$server->wsdl->addComplexType(
    'LinesArray',
    'complexType',
    'array',
开发者ID:LionSystemsSolutions,项目名称:El-Canelo-ERP,代码行数:31,代码来源:server_invoice.php

示例12: dol_syslog

// Include SOAP
require_once DOL_DOCUMENT_ROOT . '/core/lib/ws.lib.php';
require_once DOL_DOCUMENT_ROOT . '/user/class/user.class.php';
require_once DOL_DOCUMENT_ROOT . '/fourn/class/fournisseur.facture.class.php';
dol_syslog("Call Dolibarr webservices interfaces");
$langs->load("main");
// Enable and test if module web services is enabled
if (empty($conf->global->MAIN_MODULE_WEBSERVICES)) {
    $langs->load("admin");
    dol_syslog("Call Dolibarr webservices interfaces with module webservices disabled");
    print $langs->trans("WarningModuleNotActive", 'WebServices') . '.<br><br>';
    print $langs->trans("ToActivateModule");
    exit;
}
// Create the soap Object
$server = new nusoap_server();
$server->soap_defencoding = 'UTF-8';
$server->decode_utf8 = false;
$ns = 'http://www.dolibarr.org/ns/';
$server->configureWSDL('WebServicesDolibarrSupplierInvoice', $ns);
$server->wsdl->schemaTargetNamespace = $ns;
// Define WSDL Authentication object
$server->wsdl->addComplexType('authentication', 'complexType', 'struct', 'all', '', array('dolibarrkey' => array('name' => 'dolibarrkey', 'type' => 'xsd:string'), 'sourceapplication' => array('name' => 'sourceapplication', 'type' => 'xsd:string'), 'login' => array('name' => 'login', 'type' => 'xsd:string'), 'password' => array('name' => 'password', 'type' => 'xsd:string'), 'entity' => array('name' => 'entity', 'type' => 'xsd:string')));
// Define WSDL Return object
$server->wsdl->addComplexType('result', 'complexType', 'struct', 'all', '', array('result_code' => array('name' => 'result_code', 'type' => 'xsd:string'), 'result_label' => array('name' => 'result_label', 'type' => 'xsd:string')));
// Define other specific objects
$server->wsdl->addComplexType('line', 'element', 'struct', 'all', '', array('id' => array('name' => 'id', 'type' => 'xsd:string'), 'type' => array('name' => 'type', 'type' => 'xsd:int'), 'desc' => array('name' => 'desc', 'type' => 'xsd:string'), 'fk_product' => array('name' => 'fk_product', 'type' => 'xsd:int'), 'total_net' => array('name' => 'total_net', 'type' => 'xsd:double'), 'total_vat' => array('name' => 'total_vat', 'type' => 'xsd:double'), 'total' => array('name' => 'total', 'type' => 'xsd:double'), 'vat_rate' => array('name' => 'vat_rate', 'type' => 'xsd:double'), 'qty' => array('name' => 'qty', 'type' => 'xsd:double'), 'date_start' => array('name' => 'date_start', 'type' => 'xsd:date'), 'date_end' => array('name' => 'date_end', 'type' => 'xsd:date'), 'product_ref' => array('name' => 'product_ref', 'type' => 'xsd:string'), 'product_label' => array('name' => 'product_label', 'type' => 'xsd:string'), 'product_desc' => array('name' => 'product_desc', 'type' => 'xsd:string')));
$server->wsdl->addComplexType('LinesArray', 'complexType', 'array', '', 'SOAP-ENC:Array', array(), array(array('ref' => 'SOAP-ENC:arrayType', 'wsdl:arrayType' => 'tns:line[]')), 'tns:line');
$server->wsdl->addComplexType('invoice', 'element', 'struct', 'all', '', array('id' => array('name' => 'id', 'type' => 'xsd:string'), 'ref' => array('name' => 'ref', 'type' => 'xsd:string'), 'ref_ext' => array('name' => 'ref_ext', 'type' => 'xsd:string'), 'ref_supplier' => array('name' => 'ref_supplier', 'type' => 'xsd:string'), 'fk_user_author' => array('name' => 'fk_user_author', 'type' => 'xsd:int'), 'fk_user_valid' => array('name' => 'fk_user_valid', 'type' => 'xsd:int'), 'fk_thirdparty' => array('name' => 'fk_thirdparty', 'type' => 'xsd:int'), 'date_creation' => array('name' => 'date_creation', 'type' => 'xsd:dateTime'), 'date_validation' => array('name' => 'date_validation', 'type' => 'xsd:dateTime'), 'date_modification' => array('name' => 'date_modification', 'type' => 'xsd:dateTime'), 'date_invoice' => array('name' => 'date_invoice', 'type' => 'xsd:date'), 'date_term' => array('name' => 'date_modification', 'type' => 'xsd:date'), 'type' => array('name' => 'type', 'type' => 'xsd:int'), 'total_net' => array('name' => 'type', 'type' => 'xsd:double'), 'total_vat' => array('name' => 'type', 'type' => 'xsd:double'), 'total' => array('name' => 'type', 'type' => 'xsd:double'), 'note_private' => array('name' => 'note_private', 'type' => 'xsd:string'), 'note_public' => array('name' => 'note_public', 'type' => 'xsd:string'), 'status' => array('name' => 'status', 'type' => 'xsd:int'), 'close_code' => array('name' => 'close_code', 'type' => 'xsd:string'), 'close_note' => array('name' => 'close_note', 'type' => 'xsd:string'), 'lines' => array('name' => 'lines', 'type' => 'tns:LinesArray')));
$server->wsdl->addComplexType('InvoicesArray', 'complexType', 'array', '', 'SOAP-ENC:Array', array(), array(array('ref' => 'SOAP-ENC:arrayType', 'wsdl:arrayType' => 'tns:invoice[]')), 'tns:invoice');
$server->wsdl->addComplexType('invoices', 'complexType', 'array', '', 'SOAP-ENC:Array', array(), array(array('ref' => 'SOAP-ENC:arrayType', 'wsdl:arrayType' => 'tns:invoice[]')), 'tns:invoice');
开发者ID:Samara94,项目名称:dolibarr,代码行数:31,代码来源:server_supplier_invoice.php

示例13: nusoap_server

<?php

require_once "CCertInfo_class.php";
require_once 'nusoap.php';
$debug = 1;
$server = new nusoap_server();
$server->register('CCertInfo.getSubject');
$server->register('CCertInfo.getSubjAttrVal');
$server->register('CCertInfo.getText');
$server->register('CCertInfo.getInterface');
$server->register('CCertInfo.processData');
$server->register('CCertInfo.getName');
//Вот кто поймет что здесь написанно ТОМУ ПРИЗ!!!!!!!!!!!!
$HTTP_RAW_POST_DATA = isset($HTTP_RAW_POST_DATA) ? $HTTP_RAW_POST_DATA : '';
$server->service($HTTP_RAW_POST_DATA);
开发者ID:netflixmedia,项目名称:igtfca,代码行数:15,代码来源:CCertInfoSoapServer.php

示例14: nusoap_server

<?php

// Подключаем SOAP
require_once 'nusoap/nusoap.php';
$server = new nusoap_server();
$server->register('updateBill');
$server->service(file_get_contents("php://input"));
// Эта функция вызывается при уведомлениях от QIWI Кошелька
function updateBill($login, $password, $txn, $status)
{
    // Если уведомление не о успешной оплате, нам это не интересно
    if ($status != 60) {
        return new soapval('updateBillResult', 'xsd:integer', 0);
    }
    // Работаем в корневой директории
    chdir('../../');
    // Подключаем симплу
    require_once 'api/Okay.php';
    $okay = new Okay();
    // Выбираем оплачиваемый заказ
    $order = $okay->orders->get_order(intval($txn));
    // 210 = Счет не найден
    if (empty($order)) {
        return new soapval('updateBillResult', 'xsd:integer', 210);
    }
    // Выбираем из базы соответствующий метод оплаты
    $method = $okay->payment->get_payment_method(intval($order->payment_method_id));
    if (empty($method)) {
        return new soapval('updateBillResult', 'xsd:integer', 210);
    }
    // Настройки способа оплаты
开发者ID:m1has1k,项目名称:Okay,代码行数:31,代码来源:callback.php

示例15: error_reporting

<?php

// enable error reporting
error_reporting(E_ALL);
ini_set('display_error', 1);
require_once "nusoap/lib/nusoap.php";
// initialize and configure server
$server = new nusoap_server();
$server->configureWSDL('login', 'urn:login');
$server->wsdl->schemeTargeNamespace = "urn:login";
// register
$server->register('loginService', array('nim' => 'xsd:string'), array('return' => 'xsd:string'), 'urn:server', 'urn:server#loginServer', 'rpc', 'encoded', 'login ke aplikasi');
// create functions
function dbConnect($query)
{
    try {
        $connect = mysql_connect("localhost", "root", "");
        $db = mysql_select_db("universitas");
        return mysql_query($query);
    } catch (Exception $e) {
        echo $e->getMessage();
    }
}
function loginService($nim)
{
    // Check whether the user has filled all the required fields
    if (empty($nim)) {
        return 'Data tidak boleh kosong!';
    }
    // sanitize the input from user
    $nim = strip_tags(mysql_real_escape_string($nim));
开发者ID:aldogint,项目名称:SistemInformasiTerdistribusi,代码行数:31,代码来源:mhs-server.php


注:本文中的nusoap_server类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。