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


PHP nusoap_server::service方法代码示例

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


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

示例1: RunServer

 /**
  * Run the NuSOAP server
  * 
  * @param array $data The server data
  * @return boolean Response
  */
 public static function RunServer($data)
 {
     $server = $data['soapserver'];
     if ($server !== self::$Server || !class_exists('soap_server')) {
         PhpWsdl::Debug('NuSOAP not found or server object changed');
         return true;
         // We can't handle this server run!
     }
     $req = file_get_contents('php://input');
     $handled = false;
     if (!PhpWsdl::CallHook('NuSOAPRunHook', array_merge($data, array('req' => &$req, 'handled' => &$handled)))) {
         return $handled;
     }
     self::$Server->service(utf8_encode($req));
     return false;
 }
开发者ID:vasylignatyev,项目名称:soap,代码行数:22,代码来源:class.phpwsdl.nusoap.php

示例2: array

                            }
                            $iProduct++;
                        }
                    }
                    // Retour
                    $objectresp = array('result' => array('result_code' => 'OK', 'result_label' => ''), 'products' => $products);
                } else {
                    $errorcode = 'NORECORDS_FOR_ASSOCIATION';
                    $errorlabel = 'No products associated' . $sql;
                    $objectresp = array('result' => array('result_code' => $errorcode, 'result_label' => $errorlabel));
                    dol_syslog("getProductsForCategory:: " . $c->error, LOG_DEBUG);
                }
            } else {
                $error++;
                $errorcode = 'NOT_FOUND';
                $errorlabel = 'Object not found for id=' . $id;
            }
        } else {
            $error++;
            $errorcode = 'PERMISSION_DENIED';
            $errorlabel = 'User does not have permission for this request';
        }
    }
    if ($error) {
        $objectresp = array('result' => array('result_code' => $errorcode, 'result_label' => $errorlabel));
    }
    return $objectresp;
}
// Return the results.
$server->service(file_get_contents("php://input"));
开发者ID:ADDAdev,项目名称:Dolibarr,代码行数:30,代码来源:server_productorservice.php

示例3: query

{
    $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);
    curl_setopt($ch, CURLOPT_POST, 1);
    curl_setopt($ch, CURLOPT_POSTFIELDS, $post_fields);
    curl_setopt($ch, CURLOPT_, 1);
    $data = curl_exec($ch);
    curl_close($ch);
    return $data;
}
function query($query, $post)
{
    $args = array();
    foreach (json_decode($post) as $k => $v) {
        $args[$k] = $v;
    }
    $data = curl_post($query, $args);
    return $data;
}
$HTTP_RAW_POST_DATA = isset($HTTP_RAW_POST_DATA) ? $HTTP_RAW_POST_DATA : '';
$server->service($HTTP_RAW_POST_DATA);
开发者ID:Abuamany,项目名称:concerto-platform,代码行数:30,代码来源:ws_server.php

示例4: update

    $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();
    $sql = "UPDATE medidas SET\n                peso = '" . $decodificado['peso'] . "',\n                altura = '" . $decodificado['altura'] . "',\n                peitoral_maior = '" . $decodificado['peitoral_maior'] . "',\n                peitoral_menor = '" . $decodificado['peitoral_menor'] . "',\n                quadril = '" . $decodificado['quadril'] . "',\n                biceps_esquerdo = '" . $decodificado['biceps_esquerdo'] . "',\n                biceps_direito = '" . $decodificado['biceps_direito'] . "',\n                triceps_esquerdo = '" . $decodificado['triceps_esquerdo'] . "',\n                triceps_direito = '" . $decodificado['triceps_direito'] . "',\n                coxas_esquerda = '" . $decodificado['coxas_esquerda'] . "',\n                coxas_direita = '" . $decodificado['coxas_direita'] . "',\n                panturrilha_esquerda = '" . $decodificado['panturrilha_esquerda'] . "',\n                panturrilha_direita = '" . $decodificado['panturrilha_direita'] . "',\n                quadril_esquerdo = '" . $decodificado['quadril_esquerdo'] . "',\n                quadril_direito = '" . $decodificado['quadril_direito'] . "'                     \n\t\t\t\tWHERE id = " . $id;
    $result = mysql_query($sql, $conecta);
    $retorno = "{\"id\":\"ok\"}";
    return $retorno;
}
// para sobecrever se a variavel estiver em branco.
$POST_DATA = isset($GLOBALS['HTTP_RAW_POST_DATA']) ? $GLOBALS['HTTP_RAW_POST_DATA'] : '';
// devolve para o clinte
$server->service($POST_DATA);
exit;
开发者ID:Retamero,项目名称:KsoapNusoap,代码行数:31,代码来源:server.php

示例5: foreach

    if (!empty($postParams)) {
        foreach ($postParams as $key => $value) {
            $_POST[$key] = $value;
        }
    }
    $_GET['module'] = $controller['module'];
    $_GET['class'] = $controller['class'];
    $_GET['method'] = $controller['method'];
    list($module, $class, $method) = wbRequest::getController();
    $callback = wbRequest::getVarClean('callback');
    if (!wbModule::isAvailable($module, $class, $type)) {
        header("HTTP/1.1 400 Bad Request");
        return;
    }
    try {
        $result = wbModule::call($module, $class, $method, array(), $type);
    } catch (Exception $e) {
        $result = array('items' => array(), 'total' => 0, 'success' => false, 'message' => $e->getMessage());
    }
    $return = array();
    $return['success'] = $result['success'];
    $return['message'] = $result['message'];
    $return['total'] = $result['total'];
    $return['data'] = $result['items'];
    $return = base64_encode(serialize($return));
    return $return;
}
$ws_svr->register('ws_proccess', array('search' => 'xsd:string', 'getParams' => 'xsd:string', 'controller' => 'xsd:string', 'postParams' => 'xsd:string', 'jsonItems' => 'xsd:string', 'start' => 'xsd:integer', 'limit' => 'xsd:integer'), array('return' => 'xsd:string'), 'urn:' . WS_NAMA_WSDL, 'urn:' . WS_NAMA_WSDL . '#ws_proccess', 'rpc', 'encoded', 'Deskripsi fungsi ws_proccess');
$HTTP_RAW_POST_DATA = isset($HTTP_RAW_POST_DATA) ? $HTTP_RAW_POST_DATA : '';
$ws_svr->service($HTTP_RAW_POST_DATA);
exit;
开发者ID:rayminami,项目名称:mpd-wp,代码行数:31,代码来源:wsdl.php

示例6: array

        //var_dump($newobject->date_lim_reglement); exit;
        //var_dump($invoice['lines'][0]['type']);
        $db->begin();
        $result = $newobject->create($fuser, 0, dol_stringtotime($invoice['date_due'], 'dayrfc'));
        if ($result < 0) {
            $error++;
        }
        if ($invoice['status'] == 1) {
            $result = $newobject->validate($fuser);
            if ($result < 0) {
                $error++;
            }
        }
        if (!$error) {
            $db->commit();
            $objectresp = array('result' => array('result_code' => 'OK', 'result_label' => ''), 'id' => $newobject->id, 'ref' => $newobject->ref);
        } else {
            $db->rollback();
            $error++;
            $errorcode = 'KO';
            $errorlabel = $newobject->error;
        }
    }
    if ($error) {
        $objectresp = array('result' => array('result_code' => $errorcode, 'result_label' => $errorlabel));
    }
    return $objectresp;
}
// Return the results.
$server->service(isset($HTTP_RAW_POST_DATA) ? $HTTP_RAW_POST_DATA : '');
开发者ID:LionSystemsSolutions,项目名称:El-Canelo-ERP,代码行数:30,代码来源:server_invoice.php

示例7: service

 function service(&$data)
 {
     $this->raw_post_data = $data;
     parent::service($data);
 }
开发者ID:dalinhuang,项目名称:shopexts,代码行数:5,代码来源:nudime.php

示例8: array

<?php

include "/var/www/html/nusoap/lib/nusoap.php";
include "Numeros.php";
$soap = new nusoap_server();
$soap->configureWSDL('numeros');
$soap->register('Numeros.add', array('a' => 'xsd:int', 'b' => 'xsd:int'), array('return' => 'xsd:int'), 'add');
$soap->register('Numeros.divide', array('a' => 'xsd:int', 'b' => 'xsd:int'), array('return' => 'xsd:int'), 'divide');
//var_dump($HTTP_RAW_POST_DATA); die();
$HTTP_RAW_POST_DATA = isset($HTTP_RAW_POST_DATA) ? $HTTP_RAW_POST_DATA : '';
$soap->service($HTTP_RAW_POST_DATA);
开发者ID:pelif,项目名称:studyWS,代码行数:11,代码来源:wsdl-with-nusoap.php

示例9: result

 function result()
 {
     $this->layout = 'empty';
     App::import('Vendor', 'Nusoap', array('file' => 'nusoap' . DS . 'nusoap.php'));
     $server = new nusoap_server();
     $server->register('updateBill');
     $server->service($HTTP_RAW_POST_DATA);
     function updateBill($login, $password, $txn, $status)
     {
         $order = $this->Order->read(null, $txn);
         $qiwi_id_data = $this->PaymentMethod->PaymentMethodValue->find(array('key' => 'qiwi_id'));
         $qiwi_id = $qiwi_id_data['PaymentMethodValue']['value'];
         $qiwi_secret_key_data = $this->PaymentMethod->PaymentMethodValue->find(array('key' => 'qiwi_secret_key'));
         $qiwi_secret_key = $qiwi_secret_key_data['PaymentMethodValue']['value'];
         //обработка возможных ошибок авторизации
         if ($login != $qiwi_id) {
             return 150;
         }
         if (!empty($password) && $password != strtoupper(md5($txn . strtoupper(md5($qiwi_secret_key))))) {
             return 150;
         }
         // получаем номер заказа
         $transaction = intval($txn);
         // меняем статус заказа при условии оплаты счёта
         if ($status == 60) {
             $payment_method = $this->PaymentMethod->find(array('alias' => $this->module_name));
             $order_data = $this->Order->find('first', array('conditions' => array('Order.id' => $txn)));
             $order_data['Order']['order_status_id'] = $payment_method['PaymentMethod']['order_status_id'];
             $this->Order->save($order_data);
         }
     }
 }
开发者ID:risnandar,项目名称:testing,代码行数:32,代码来源:qiwi_controller.php


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