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


PHP nusoap_server::register方法代码示例

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


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

示例1: isset

<?php

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

示例2: GetComplexType1

// Include the nusoap file
include "nusoap.php";
// Setup the WSDL
$server = new nusoap_server();
$server->debug_flag = false;
$server->configureWSDL('ExampleWsdl', $ns);
$server->wsdl->schemaTargetNamespace = $ns;
// Create a complex type
$server->wsdl->addComplexType('ComplexType1', 'complexType', 'struct', 'all', '', array('Id' => array('name' => 'Id', 'type' => 'xsd:int'), 'Title' => array('name' => 'Title', 'type' => 'xsd:string'), 'Distance' => array('name' => 'Distance', 'type' => 'xsd:float'), 'Date' => array('name' => 'Date', 'type' => 'xsd:date')));
// Create an array of the above ComplexType1
// - Note that ComplexType1 is used with []'s and then without []'s
$server->wsdl->addComplexType('Array1', 'complexType', 'array', '', 'SOAP-ENC:Array', array(), array(array('ref' => 'SOAP-ENC:arrayType', 'wsdl:arrayType' => 'tns:ComplexType1[]')), 'tns:ComplexType1');
// Create a complex type to upload a file
$server->wsdl->addComplexType('FileBytes', 'complexType', 'array', '', 'SOAP-ENC:Array', array(), array(array('ref' => 'SOAP-ENC:arrayType', 'wsdl:arrayType' => 'xsd:unsignedByte[]')), 'xsd:unsignedByte');
// Register the method to return a single ComplexType1
$server->register('GetComplexType1', array('Id' => 'xsd:int'), array('return' => 'tns:ComplexType1'), $ns, $ns . '#GetComplexType1', 'rpc', 'encoded', 'Get Specific ComplexType1');
// Register the method to return all ComplexType1s
$server->register('GetAllComplexType1', array(), array('return' => 'tns:Array1'), $ns, $ns . '#GetAllComplexType1', 'rpc', 'encoded', 'Get All ComplexType1');
// Register the method to update a single CompexType1
$server->register('UpdateComplexType1', array('ComplexType1' => 'tns:ComplexType1'), array('return' => 'xsd:boolean'), $ns, $ns . '#UpdateComplexType1', 'rpc', 'encoded', 'Update a Complex Type');
// Register the method to uplaod a file
$server->register('UploadFile', array('bytes' => 'tns:FileBytes', 'filename' => 'xsd:string'), array('return' => 'xsd:boolean'), $ns, $ns . '#UploadFile', 'rpc', 'encoded', 'Upload a File');
// Use the request to (try to) invoke the service
$HTTP_RAW_POST_DATA = isset($GLOBALS['HTTP_RAW_POST_DATA']) ? $GLOBALS['HTTP_RAW_POST_DATA'] : '';
$server->service($HTTP_RAW_POST_DATA);
exit;
/* 
 * Declare the functions which are called when the above methods are used 
 */
function GetComplexType1($id)
{
开发者ID:Ezyva2015,项目名称:SMSF-Academy-Wordpress,代码行数:31,代码来源:examplewsdl.php

示例3: curl_post

 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);
    curl_setopt($ch, CURLOPT_POST, 1);
    curl_setopt($ch, CURLOPT_POSTFIELDS, $post_fields);
开发者ID:Abuamany,项目名称:concerto-platform,代码行数:31,代码来源:ws_server.php

示例4: exemplo

<?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

示例5: getThirdParty

// Define other specific objects
$server->wsdl->addComplexType('thirdparty', 'complexType', 'struct', 'all', '', $thirdparty_fields);
// Define other specific objects
$server->wsdl->addComplexType('filterthirdparty', 'complexType', 'struct', 'all', '', array('client' => array('name' => 'client', 'type' => 'xsd:string'), 'supplier' => array('name' => 'supplier', 'type' => 'xsd:string'), 'category' => array('name' => 'category', 'type' => 'xsd:string')));
$server->wsdl->addComplexType('ThirdPartiesArray', 'complexType', 'array', '', 'SOAP-ENC:Array', array(), array(array('ref' => 'SOAP-ENC:arrayType', 'wsdl:arrayType' => 'tns:thirdparty[]')), 'tns:thirdparty');
$server->wsdl->addComplexType('ThirdPartiesArray2', 'complexType', 'array', 'sequence', '', array('thirdparty' => array('name' => 'thirdparty', 'type' => 'tns:thirdparty', 'minOccurs' => '0', 'maxOccurs' => 'unbounded')));
// 5 styles: RPC/encoded, RPC/literal, Document/encoded (not WS-I compliant), Document/literal, Document/literal wrapped
// Style merely dictates how to translate a WSDL binding to a SOAP message. Nothing more. You can use either style with any programming model.
// http://www.ibm.com/developerworks/webservices/library/ws-whichwsdl/
$styledoc = 'rpc';
// rpc/document (document is an extend into SOAP 1.0 to support unstructured messages)
$styleuse = 'encoded';
// encoded/literal/literal wrapped
// Better choice is document/literal wrapped but literal wrapped not supported by nusoap.
// Register WSDL
$server->register('getThirdParty', array('authentication' => 'tns:authentication', 'id' => 'xsd:string', 'ref' => 'xsd:string', 'ref_ext' => 'xsd:string'), array('result' => 'tns:result', 'thirdparty' => 'tns:thirdparty'), $ns, $ns . '#getThirdParty', $styledoc, $styleuse, 'WS to get a thirdparty from its id, ref or ref_ext');
// Register WSDL
$server->register('createThirdParty', array('authentication' => 'tns:authentication', 'thirdparty' => 'tns:thirdparty'), array('result' => 'tns:result', 'id' => 'xsd:string', 'ref' => 'xsd:string'), $ns, $ns . '#createThirdParty', $styledoc, $styleuse, 'WS to create a thirdparty');
// Register WSDL
$server->register('updateThirdParty', array('authentication' => 'tns:authentication', 'thirdparty' => 'tns:thirdparty'), array('result' => 'tns:result', 'id' => 'xsd:string'), $ns, $ns . '#updateThirdParty', $styledoc, $styleuse, 'WS to update a thirdparty');
// Register WSDL
$server->register('getListOfThirdParties', array('authentication' => 'tns:authentication', 'filterthirdparty' => 'tns:filterthirdparty'), array('result' => 'tns:result', 'thirdparties' => 'tns:ThirdPartiesArray2'), $ns, $ns . '#getListOfThirdParties', $styledoc, $styleuse, 'WS to get list of thirdparties id and ref');
// Full methods code
function getThirdParty($authentication, $id = '', $ref = '', $ref_ext = '')
{
    global $db, $conf, $langs;
    dol_syslog("Function: getThirdParty login=" . $authentication['login'] . " id=" . $id . " ref=" . $ref . " ref_ext=" . $ref_ext);
    if ($authentication['entity']) {
        $conf->entity = $authentication['entity'];
    }
    // Init and check authentication
开发者ID:ADDAdev,项目名称:Dolibarr,代码行数:31,代码来源:server_thirdparty.php

示例6: isset

<?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

示例7: array



// 5 styles: RPC/encoded, RPC/literal, Document/encoded (not WS-I compliant), Document/literal, Document/literal wrapped
// Style merely dictates how to translate a WSDL binding to a SOAP message. Nothing more. You can use either style with any programming model.
// http://www.ibm.com/developerworks/webservices/library/ws-whichwsdl/
$styledoc='rpc';       // rpc/document (document is an extend into SOAP 1.0 to support unstructured messages)
$styleuse='encoded';   // encoded/literal/literal wrapped
// Better choice is document/literal wrapped but literal wrapped not supported by nusoap.

// Register WSDL
$server->register(
    'getSupplierInvoice',
    // Entry values
    array('authentication'=>'tns:authentication','id'=>'xsd:string','ref'=>'xsd:string','ref_ext'=>'xsd:string'),
    // Exit values
    array('result'=>'tns:result','invoice'=>'tns:invoice'),
    $ns,
    $ns.'#getSupplierInvoice',
    $styledoc,
    $styleuse,
    'WS to get SupplierInvoice'
);
$server->register(
    'getSupplierInvoicesForThirdParty',
    // Entry values
    array('authentication'=>'tns:authentication','idthirdparty'=>'xsd:string'),
    // Exit values
    array('result'=>'tns:result','invoices'=>'tns:invoices'),
    $ns,
    $ns.'#getSupplierInvoicesForThirdParty',
    $styledoc,
    $styleuse,
开发者ID:nrjacker4,项目名称:crm-php,代码行数:30,代码来源:server_supplier_invoice.php

示例8: 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

示例9: isset

<?php

require_once "CGetCert_class.php";
require_once 'nusoap.php';
$debug = 1;
$server = new nusoap_server();
$server->register('CGetCert.getInterface');
$server->register('CGetCert.processData');
$server->register('CGetCert.getName');
$HTTP_RAW_POST_DATA = isset($HTTP_RAW_POST_DATA) ? $HTTP_RAW_POST_DATA : '';
$server->service($HTTP_RAW_POST_DATA);
开发者ID:netflixmedia,项目名称:igtfca,代码行数:11,代码来源:CGetCertSoapServer.php

示例10: getDataByID

<?php

error_reporting(E_ALL);
ini_set('display_error', 1);
require_once 'nusoap/lib/nusoap.php';
require_once 'adodb/adodb.inc.php';
require_once 'buku.php';
$server = new nusoap_server();
$server->configureWSDL('Service Buku', 'urn:buku');
$server->wsdl->schemaTargetNamespace = 'urn:buku';
$server->register('get_buku', array(), array('return' => 'xsd:string'), 'urn:buku', 'urn:buku#get_buku', 'rpc', 'encoded', 'mengambil semua data buku');
$server->register('get_buku_by_id', array('id' => 'xsd:string'), array('return' => 'xsd:string'), 'urn:buku', 'urn:buku#get_buku_by_id', 'rpc', 'encoded', 'mengambil semua data buku berdasarkan id');
$server->register('hapus_buku', array('id' => 'xsd:string'), array('return' => 'xsd:string'), 'urn:buku', 'urn:buku#hapus_buku', 'rpc', 'encoded', 'menghapus data buku');
$server->register('tambah_buku', array('no' => 'xsd:string', 'id' => 'xsd:string', 'nama' => 'xsd:string', 'pengarang' => 'xsd:string', 'penerbit' => 'xsd:string', 'tahun' => 'xsd:string'), array('return' => 'xsd:string'), 'urn:buku', 'urn:buku#tambah_buku', 'rpc', 'encoded', 'menambah data buku');
$server->register('getDataByID', array('id' => 'xsd:string'), array('return' => 'xsd:string'), 'urn:buku', 'urn:buku#getDataByID', 'rpc', 'encoded', 'ambil data by id');
$server->register('ubah_buku', array('idAWAL' => 'xsd:string', 'no' => 'xsd:string', 'id' => 'xsd:string', 'nama' => 'xsd:string', 'pengarang' => 'xsd:string', 'penerbit' => 'xsd:string', 'tahun' => 'xsd:string'), array('return' => 'xsd:string'), 'urn:buku', 'urn:buku#ubah_buku', 'rpc', 'encoded', 'merubah data buku');
function getDataByID($id)
{
    $buku = new Buku();
    return $buku->getDataByID($id);
}
function get_buku_by_id($id)
{
    $buku = new Buku();
    return $buku->get_buku_by_id($id);
}
function get_buku()
{
    $buku = new Buku();
    return $buku->get_buku();
}
开发者ID:denyadiyasa,项目名称:TugasAkhir,代码行数:31,代码来源:server.php

示例11: getInvoice

    array(
        array('ref'=>'SOAP-ENC:arrayType','wsdl:arrayType'=>'tns:invoice[]')
    ),
    'tns:invoice'
);*/
$server->wsdl->addComplexType('InvoicesArray2', 'complexType', 'array', 'sequence', '', array('invoice' => array('name' => 'invoice', 'type' => 'tns:invoice', 'minOccurs' => '0', 'maxOccurs' => 'unbounded')));
// 5 styles: RPC/encoded, RPC/literal, Document/encoded (not WS-I compliant), Document/literal, Document/literal wrapped
// Style merely dictates how to translate a WSDL binding to a SOAP message. Nothing more. You can use either style with any programming model.
// http://www.ibm.com/developerworks/webservices/library/ws-whichwsdl/
$styledoc = 'rpc';
// rpc/document (document is an extend into SOAP 1.0 to support unstructured messages)
$styleuse = 'encoded';
// encoded/literal/literal wrapped
// Better choice is document/literal wrapped but literal wrapped not supported by nusoap.
// Register WSDL
$server->register('getInvoice', array('authentication' => 'tns:authentication', 'id' => 'xsd:string', 'ref' => 'xsd:string', 'ref_ext' => 'xsd:string'), array('result' => 'tns:result', 'invoice' => 'tns:invoice'), $ns, $ns . '#getInvoice', $styledoc, $styleuse, 'WS to get a particular invoice');
$server->register('getInvoicesForThirdParty', array('authentication' => 'tns:authentication', 'idthirdparty' => 'xsd:string'), array('result' => 'tns:result', 'invoices' => 'tns:InvoicesArray2'), $ns, $ns . '#getInvoicesForThirdParty', $styledoc, $styleuse, 'WS to get all invoices of a third party');
$server->register('createInvoice', array('authentication' => 'tns:authentication', 'invoice' => 'tns:invoice'), array('result' => 'tns:result', 'id' => 'xsd:string', 'ref' => 'xsd:string'), $ns, $ns . '#createInvoice', $styledoc, $styleuse, 'WS to create an invoice');
/**
 * Get invoice from id, ref or ref_ext.
 *
 * @param	array		$authentication		Array of authentication information
 * @param	int			$id					Id
 * @param	string		$ref				Ref
 * @param	string		$ref_ext			Ref_ext
 * @return	array							Array result
 */
function getInvoice($authentication, $id = '', $ref = '', $ref_ext = '')
{
    global $db, $conf, $langs;
    dol_syslog("Function: getInvoice login=" . $authentication['login'] . " id=" . $id . " ref=" . $ref . " ref_ext=" . $ref_ext);
开发者ID:LionSystemsSolutions,项目名称:El-Canelo-ERP,代码行数:31,代码来源:server_invoice.php

示例12: formas

<?php

#servidor web service
require_once 'lib/nusoap.php';
require_once 'func_bd.php';
include_once 'class.forms.php';
include_once 'config.php';
$bd = new formas($dsnAdmin);
#el recurso global de la base de datos
$server = new nusoap_server();
$server->register('datos');
#registra la funcion "datos" de func_bd.php
$server->register('sql');
#registra la funcion "sql" de func_bd.php
$server->register('sql2mod');
$server->register('getTotalPorCliente');
$server->register('getTotal');
$server->register('getTotalPorSuc');
$server->register('getTotalCliSuc');
$server->register('getFolios');
$server->register('getPartidas');
$server->register('getConcepto');
//*/
$server->register('modifTotal');
//*/
$server->register('addPartidaFolio');
//*/
$server->register('sqlhash');
//*/
$server->register('sqlHashQry');
$HTTP_RAW_POST_DATA = isset($HTTP_RAW_POST_DATA) ? $HTTP_RAW_POST_DATA : '';
开发者ID:alexlqi,项目名称:adminteprod,代码行数:31,代码来源:server.php

示例13: login

require_once 'nusoap/lib/nusoap.php';
//include('library.php');
include 'penduduk.php';
include 'calon.php';
$server = new nusoap_server();
$server->configureWSDL('server', 'urn:server');
$server->wsdl->schemaTargetNamespace = 'urn:server';
ini_set('display_errors', 'off');
//return type
$server->wsdl->addComplexType('Calon', 'complexType', 'array', 'all', '', array('idcalon' => array('name' => 'idcalon', 'type' => 'xsd:int'), 'nocalon' => array('name' => 'nocalon', 'type' => 'xsd:int'), 'nama' => array('name' => 'nama', 'type' => 'xsd:string'), 'partai' => array('name' => 'partai', 'type' => 'xsd:string'), 'visimisi' => array('name' => 'visimisi', 'type' => 'xsd:string')));
$server->wsdl->addComplexType('ArrayCalon', 'complexType', 'array', '', 'SOAP-ENC:Array', array(), array(array('ref' => 'SOAP-ENC:arrayType', 'wsdl:arrayType' => 'tns:Calon[]')));
$server->wsdl->addComplexType('Penduduk', 'complexType', 'array', 'all', '', array('noktp' => array('name' => 'noktp', 'type' => 'xsd:int'), 'nama' => array('name' => 'nama', 'type' => 'xsd:string'), 'jeniskelamin' => array('name' => 'jeniskelamin', 'type' => 'xsd:string'), 'alamat' => array('name' => 'alamat', 'type' => 'xsd:string')));
$server->wsdl->addComplexType('ArrayPenduduk', 'complexType', 'array', '', 'SOAP-ENC:Array', array(), array(array('ref' => 'SOAP-ENC:arrayType', 'wsdl:arrayType' => 'tns:Penduduk[]')));
//register method
$server->register('login', array('noktp' => 'xsd:int'), array('return' => 'xsd:string'), 'urn:server', 'urn:server#loginServer', 'rpc', 'encoded', 'login');
$server->register('getAllCalon', array(), array('return' => 'tns:ArrayCalon'), 'urn:server', 'urn:server#getAllCalon', 'rpc', 'encoded', 'get AllCalon');
$server->register('getDetailCalon', array('idcalon' => 'xsd:int'), array('return' => 'tns:Calon'), 'urn:server', 'urn:server#getDetailCalon', 'rpc', 'encoded', 'get Detail Calon');
$server->register('getAllPenduduk', array('noktp' => 'xsd:int'), array('return' => 'tns:ArrayPenduduk'), 'urn:server', 'urn:server#getAllPenduduk', 'rpc', 'encoded', 'get All Penduduk');
$server->register('getDetailPenduduk', array('noktp' => 'xsd:int'), array('return' => 'tns:Penduduk'), 'urn:server', 'urn:server#getDetailPenduduk', 'rpc', 'encoded', 'get Detail Penduduk');
$server->register('checkVote', array('noktp' => 'xsd:int'), array('return' => 'xsd:string'), 'urn:server', 'urn:server#checkVote', 'rpc', 'encoded', 'checkVote');
$server->register('voteCalon', array('noktp' => 'xsd:int', 'idcalon' => 'xsd:int'), array('return' => 'xsd:string'), 'urn:server', 'urn:server#voteCalon', 'rpc', 'encoded', 'voteCalon');
$server->register('insertPenduduk', array('noktp' => 'xsd:int', 'nama' => 'xsd:string', 'jeniskelamin' => 'xsd:string', 'alamat' => 'xsd:string'), array('return' => 'xsd:string'), 'urn:server', 'urn:server#insertPenduduk', 'rpc', 'encoded', 'insert Penduduk');
$server->register('updatePenduduk', array('noktp' => 'xsd:int', 'nama' => 'xsd:string', 'jeniskelamin' => 'xsd:string', 'alamat' => 'xsd:string'), array('return' => 'xsd:string'), 'urn:server', 'urn:server#updatePenduduk', 'rpc', 'encoded', 'update Penduduk');
$server->register('deletePenduduk', array('noktp' => 'xsd:int'), array('return' => 'xsd:string'), 'urn:server', 'urn:server#deletePenduduk', 'rpc', 'encoded', 'delete Penduduk');
function login($noktp)
{
    $obj = new Penduduk();
    $result = $obj->login($noktp);
    return $result;
}
开发者ID:guruh19,项目名称:pemilu,代码行数:30,代码来源:server.php

示例14: sprintf

    } else {
        $v_key_search = !$p_key_search || $p_key_search == '' ? '' : $p_key_search;
        $v_page = !$p_page || $p_page == '' ? 0 : $p_page;
        $v_page_size = !$p_page_size || $p_page_size == '' ? 10 : $p_page_size;
        $v_page = (int) $v_page;
        $v_page_size = (int) $v_page_size;
        $v_key_search = '%' . $v_key_search . '%';
        $v_key_search = (string) $v_key_search;
        $sql = "SELECT * \nFROM info_penduduk_propinsi\nWHERE prop_nama like '%s' \nLIMIT %d, %d";
        $sql = sprintf($sql, $v_key_search, $v_page, $v_page_size);
        $stmt = mysql_query($sql, $conn);
        $return_data_count = mysql_affected_rows($conn);
        $return_data = array();
        if (is_resource($stmt)) {
            while ($row = mysql_fetch_array($stmt)) {
                $return_data[] = $row;
            }
        }
        $return['data_count'] = $return_data_count;
        $return['data'] = $return_data;
    }
    //encode data
    $return = base64_encode(serialize($return));
    return $return;
}
//Register Function to Service
$ws_svr->register('list_propinsi', array('p_key_search' => 'xsd:string', 'p_page' => 'xsd:integer', 'p_page_size' => 'xsd:integer'), array('return' => 'xsd:string'), 'urn:' . WS_NAMA_WSDL, 'urn:' . WS_NAMA_WSDL . '#list_propinsi', 'rpc', 'encoded', 'Deskripsi fungsi list_propinsi');
//Create The Service Response
$HTTP_RAW_POST_DATA = isset($HTTP_RAW_POST_DATA) ? $HTTP_RAW_POST_DATA : '';
$ws_svr->service($HTTP_RAW_POST_DATA);
exit;
开发者ID:latif5,项目名称:TugasAkhir,代码行数:31,代码来源:ws_server.php

示例15: CreateServer

 /**
  * Create a NuSOAP soap_server object
  * 
  * @param PhpWsdl $server The PhpWsdl object
  * @return nusoap_server The NuSOAP server object
  */
 public static function CreateServer($server)
 {
     if (!is_null(self::$Server)) {
         return self::$Server;
     }
     // Basic configuration
     self::$Server = new nusoap_server();
     self::$Server->debug_flag = false;
     self::$Server->soap_defencoding = 'UTF-8';
     self::$Server->decode_utf8 = false;
     self::$Server->configureWSDL($server->Name, $server->NameSpace, $server->EndPoint);
     self::$Server->wsdl->schemaTargetNamespace = $server->NameSpace;
     if (!PhpWsdl::CallHook('NuSOAPConfigHook', array('server' => self::$Server))) {
         return self::$Server;
     }
     // Add types
     $i = -1;
     $len = sizeof($server->Types);
     while (++$i < $len) {
         $t = $server->Types[$i];
         PhpWsdl::Debug('Add complex type ' . $t->Name);
         if (!PhpWsdl::CallHook('NuSOAPTypeHook', array_merge($data, array('type' => &$t)))) {
             continue;
         }
         if ($t->IsArray) {
             $type = $t->Type;
             self::$Server->wsdl->addComplexType($t->Name, 'complexType', 'array', '', 'SOAP-ENC:Array', array(), array(array('ref' => 'SOAP-ENC:arrayType', 'wsdl:arrayType' => (in_array($type, PhpWsdl::$BasicTypes) ? 'xsd:' . $type : 'tns:' . $type) . '[]')), in_array($type, PhpWsdl::$BasicTypes) ? 'xsd:' . $type : 'tns:' . $type);
         } else {
             if (get_class($t) == 'PhpWsdlEnum') {
                 self::$Server->wsdl->addSimpleType($t->Name, in_array($t->Type, PhpWsdl::$BasicTypes) ? 'xsd:' . $t->Type : 'tns:' . $t->Type, 'simpleType', 'scalar', $t->Elements);
             } else {
                 $el = array();
                 $j = -1;
                 $eLen = sizeof($t->Elements);
                 while (++$j < $eLen) {
                     $e = $t->Elements[$j];
                     $el[$e->Name] = array('name' => $e->Name, 'type' => in_array($e->Type, PhpWsdl::$BasicTypes) ? 'xsd:' . $e->Type : 'tns:' . $e->Type);
                 }
                 self::$Server->wsdl->addComplexType($t->Name, 'complexType', 'struct', 'sequence', '', $el);
             }
         }
     }
     PhpWsdl::CallHook('NuSOAPTypesHook', $data);
     // Add methods
     $i = -1;
     $len = sizeof($server->Methods);
     while (++$i < $len) {
         $m = $server->Methods[$i];
         PhpWsdl::Debug('Register method ' . $m->Name);
         if (!PhpWsdl::CallHook('NuSOAPMethodHook', array_merge($data, array('method' => &$m)))) {
             continue;
         }
         $param = array();
         $j = -1;
         $pLen = sizeof($m->Param);
         while (++$j < $pLen) {
             $p = $m->Param[$j];
             $param[$p->Name] = in_array($p->Type, PhpWsdl::$BasicTypes) ? 'xsd:' . $p->Type : 'tns:' . $p->Type;
         }
         $r = $m->Return;
         self::$Server->register($m->IsGlobal ? $m->Name : $server->Name . '.' . $m->Name, $param, is_null($r) ? array() : array('return' => in_array($r->Type, PhpWsdl::$BasicTypes) ? 'xsd:' . $r->Type : 'tns:' . $r->Type), $server->NameSpace, $server->NameSpace . $m->Name, 'rpc', 'encoded');
     }
     PhpWsdl::CallHook('NuSOAPMethodsHook', $data);
     return self::$Server;
 }
开发者ID:vasylignatyev,项目名称:soap,代码行数:71,代码来源:class.phpwsdl.nusoap.php


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