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


PHP SoapClient::__SoapCall方法代码示例

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


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

示例1: executeTalendWebservice

/**
 * @method
 *
 * Executes a Talend Web Service..
 *
 * @name executeTalendWebservice
 * @label Executes a Talend Web Service.
 *
 * @param string | $wsdl | Talend Web Service (including ?WSDL)
 * @param array(array(n1 v1) array(n2 v2) array(nN vN)) | $params | Array of params. Pairs of param Name Value
 * @param string | $message | Message to be displayed
 * @return array | $return | Talend Array
 *
 */
function executeTalendWebservice($wsdl, $params = array(), $message)
{
    $client = new SoapClient($wsdl, array('trace' => 1));
    $params[0] = "";
    foreach ($params as $paramO) {
        $params[] = "--context_param" . $paramO[0] . "=" . $paramO[1];
    }
    $result = $client->__SoapCall('runJob', array($params));
    /*
    $params[1]="--context_param nb_line=".@=Quantity;
    
    $result = $client->__SoapCall('runJob', array($params));
    foreach ($result->item as $keyItem => $item){
    $gridRow=$keyItem+1;
    @=USERSINFO[$gridRow]['NAME']=$item->item[1];
    @=USERSINFO[$gridRow]['LASTNAME']=$item->item[2];
    @=USERSINFO[$gridRow]['DATE']=$item->item[0];
    @=USERSINFO[$gridRow]['STREET']=$item->item[3];
    @=USERSINFO[$gridRow]['CITY']=$item->item[4];
    @=USERSINFO[$gridRow]['STATE']=$item->item[5];
    @=USERSINFO[$gridRow]['STATEID']=$item->item[6];
    
    }
    */
    G::SendMessageText("<font color='blue'>Information from Talend ETL webservice</font><font color='darkgray'><br>" . $wsdl . "</font>", "INFO");
}
开发者ID:nshong,项目名称:processmaker,代码行数:40,代码来源:class.pmTalendFunctions.php

示例2: continuarCaso

 function continuarCaso($app_uid, $sessionId)
 {
     try {
         $caseId = $app_uid;
         $Endpoint = "http://staging.portal-excel.com:80/sysworkflow/en/classic/services/wsdl2";
         $client = new SoapClient($Endpoint);
         $params = array(array('sessionId' => $sessionId, 'caseId' => $caseId, 'delIndex' => '1'));
         $result = $client->__SoapCall('routeCase', $params);
         if ($result->status_code == 0) {
             return true;
         } else {
             return false;
         }
     } catch (Exception $e) {
         return false;
     }
 }
开发者ID:Santtiago,项目名称:test,代码行数:17,代码来源:consumeCaso.php

示例3: CreateSugarLeads

/**
 * @method
 *
 * Creates SugarCRM entries from the Account module
 *
 * @name CreateSugarLeads
 *
 * @label Creates SugarCRM entries from the Account module
 *
 * @param string | $sugarSoap | Sugar SOAP URL | http://www.example.com/sugar/soap.php?wsdl
 * @param string | $user | User
 * @param string | $password | Password
 * @param string | $first_name | First Name
 * @param string | $last_name | Last Name
 * @param string | $email | Email
 * @param string | $title | Title
 * @param string | $phone | Phone Work
 * @param string | $account_id | Valid id account
 * @param string | $resultType=array | Result type (array or object)
 *
 * @return array/object | $sugarContact | Sugar Opportunities (array or object)
 *
 */
function CreateSugarLeads($sugarSoap, $user, $password, $first_name, $last_name, $email, $title, $phone, $account_id, $resultType = "array")
{
    $module = "Leads";
    $sessionId = sugarLogin($sugarSoap, $user, $password);
    $client = new SoapClient($sugarSoap, array('trace' => 1));
    $request_array = array('session' => $sessionId, 'module_name' => $module, array(array("name" => 'first_name', "value" => $first_name), array("name" => 'last_name', "value" => $last_name), array("name" => 'email1', "value" => $email), array("name" => 'title', "value" => $title), array("name" => 'phone_work', "value" => $phone), array("name" => 'account_id', "value" => $account_id)));
    $sugarEntriesO = $client->__SoapCall('set_entry', $request_array);
    switch ($resultType) {
        case 'array':
            $sugarEntries = objectToArray($sugarEntriesO);
            break;
        case 'object':
            $sugarEntries = $sugarEntries;
            break;
        default:
            $sugarEntries = objectToArray($sugarEntries);
    }
    return $sugarEntries;
}
开发者ID:nshong,项目名称:processmaker,代码行数:42,代码来源:class.pmSugarFunctions.php

示例4: getAuthHeaders

    protected function getAuthHeaders()
    {
        //this function is used to get the proper headers for inclusion in our own __soapCall method

        // if we don't have a saved auth token get one
        if ((!isset($this->authToken)) || trim($this->authToken == '')) {
            $this->log .= "Fetching new authToken\n";
            //these are the params set in the constructor
            $authReqParams = Array('userName' => $this->userName, 'password' => $this->userPass);
            $responseHeaders = '';
            try {
                //run the soap call to get it - with the headers.  Use the parent soap call in case we overload our soap method
                $response = parent::__SoapCall("Authenticate", array('parameters' => $authReqParams), null, null, $responseHeaders);
                $this->authToken = $responseHeaders['AuthorizationToken']->Token;
                $this->xwebNamespace = $response->AuthenticateResult;
            } catch (SoapFault $exception) {
                throw $exception;
            }
        }

        //return the header we oh so want.
        return new SoapHeader($this->xwebNamespace, 'AuthorizationToken', Array('Token' => $this->authToken), true);
    }
开发者ID:ankita-parashar,项目名称:magento,代码行数:23,代码来源:XwebSoapClient.php

示例5: caseSchedulerCron

 public function caseSchedulerCron($date, &$log = array(), $cron = 0)
 {
     G::LoadClass('dates');
     require_once 'classes/model/LogCasesScheduler.php';
     $oDates = new dates();
     $nTime = strtotime($date);
     $dCurrentDate = date('Y-m-d', $nTime) . ' 00:00:00';
     $dNextDay = date('Y-m-d', strtotime("{$dCurrentDate}")) . ' 23:59:59';
     $oCriteria = $this->getAllCriteria();
     $oCriteria->addAnd(CaseSchedulerPeer::SCH_STATE, 'INACTIVE', Criteria::NOT_EQUAL);
     $oCriteria->addAnd(CaseSchedulerPeer::SCH_STATE, 'PROCESSED', Criteria::NOT_EQUAL);
     $oCriteria->add($oCriteria->getNewCriterion(CaseSchedulerPeer::SCH_TIME_NEXT_RUN, $dCurrentDate, Criteria::GREATER_EQUAL)->addAnd($oCriteria->getNewCriterion(CaseSchedulerPeer::SCH_TIME_NEXT_RUN, $dNextDay, Criteria::LESS_EQUAL))->addOr($oCriteria->getNewCriterion(CaseSchedulerPeer::SCH_OPTION, '5', Criteria::GREATER_EQUAL)));
     $oCriteria->add(CaseSchedulerPeer::SCH_END_DATE, null, Criteria::EQUAL);
     $oCriteria->addOr(CaseSchedulerPeer::SCH_END_DATE, $dCurrentDate, Criteria::GREATER_EQUAL);
     $oDataset = CaseSchedulerPeer::doSelectRS($oCriteria);
     $oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
     $oDataset->next();
     $sValue = '';
     $sActualTime = '';
     $sDaysPerformTask = '';
     $sWeeks = '';
     $sStartDay = '';
     $sMonths = '';
     while ($aRow = $oDataset->getRow()) {
         if ($cron == 1) {
             $arrayCron = unserialize(trim(@file_get_contents(PATH_DATA . "cron")));
             $arrayCron["processcTimeStart"] = time();
             @file_put_contents(PATH_DATA . "cron", serialize($arrayCron));
         }
         $sSchedulerUid = $aRow['SCH_UID'];
         $sOption = $aRow['SCH_OPTION'];
         switch ($sOption) {
             case '1':
                 $sDaysPerformTask = $aRow['SCH_DAYS_PERFORM_TASK'];
                 $aDaysPerformTask = explode('|', $sDaysPerformTask);
                 $sValue = $aDaysPerformTask[0];
                 if ($sValue != 1) {
                     $sDaysPerformTask = $aDaysPerformTask[1];
                 }
                 break;
             case '2':
                 $sDaysPerformTask = $aRow['SCH_EVERY_DAYS'];
                 $sWeeks = $aRow['SCH_WEEK_DAYS'];
                 break;
             case '3':
                 $sStartDay = $aRow['SCH_START_DAY'];
                 $sMonths = $aRow['SCH_MONTHS'];
                 $aStartDay = explode('|', $sStartDay);
                 $sValue = $aStartDay[0];
                 break;
             case '4':
                 $aRow['SCH_STATE'] = 'PROCESSED';
                 break;
             case '5':
                 break;
         }
         $sActualTime = $aRow['SCH_TIME_NEXT_RUN'];
         $sActualDataHour = date('H', strtotime($aRow['SCH_TIME_NEXT_RUN']));
         $sActualDataMinutes = date('i', strtotime($aRow['SCH_TIME_NEXT_RUN']));
         $dActualSysHour = date('H', $nTime);
         $dActualSysHour = $dActualSysHour == '00' ? '24' : $dActualSysHour;
         $dActualSysMinutes = date('i', $nTime);
         $sActualDataTime = strtotime($aRow['SCH_TIME_NEXT_RUN']);
         $sActualSysTime = strtotime($nTime);
         // note added consider the posibility to encapsulate some in functionality in a class method or some funtions
         if ($sActualDataHour < $dActualSysHour) {
             $_PORT = SERVER_PORT != '80' ? ':' . SERVER_PORT : '';
             $defaultEndpoint = 'http://' . SERVER_NAME . $_PORT . '/sys' . SYS_SYS . '/' . SYS_LANG . '/classic/services/wsdl2';
             println(" - Connecting webservice: {$defaultEndpoint}");
             $user = $aRow["SCH_DEL_USER_NAME"];
             $pass = $aRow["SCH_DEL_USER_PASS"];
             $processId = $aRow["PRO_UID"];
             $taskId = $aRow["TAS_UID"];
             $client = new SoapClient($defaultEndpoint);
             $params = array('userid' => $user, 'password' => 'md5:' . $pass);
             $result = $client->__SoapCall('login', array($params));
             eprint(" - Logging as user {$user}.............");
             if ($result->status_code == 0) {
                 eprintln("OK+", 'green');
                 $sessionId = $result->message;
                 $newCaseLog = new LogCasesScheduler();
                 $newRouteLog = new LogCasesScheduler();
                 $variables = array();
                 $params = array('sessionId' => $sessionId, 'processId' => $processId, 'taskId' => $taskId, 'variables' => $variables);
                 $paramsLog = array('PRO_UID' => $processId, 'TAS_UID' => $taskId, 'SCH_UID' => $sSchedulerUid, 'USR_NAME' => $user, 'RESULT' => '', 'EXEC_DATE' => date('Y-m-d'), 'EXEC_HOUR' => date('H:i:s'), 'WS_CREATE_CASE_STATUS' => '', 'WS_ROUTE_CASE_STATUS' => '');
                 $sw_transfer_control_plugin = false;
                 //This SW will be true only if a plugin is allowed to continue the action
                 //If this Job was was registered to be performed by a plugin
                 if (isset($aRow['CASE_SH_PLUGIN_UID']) && $aRow['CASE_SH_PLUGIN_UID'] != "") {
                     //Check if the plugin is active
                     $pluginParts = explode("--", $aRow['CASE_SH_PLUGIN_UID']);
                     if (count($pluginParts) == 2) {
                         //***************** Plugins **************************
                         G::LoadClass('plugin');
                         //here we are loading all plugins registered
                         //the singleton has a list of enabled plugins
                         $sSerializedFile = PATH_DATA_SITE . 'plugin.singleton';
                         $oPluginRegistry =& PMPluginRegistry::getSingleton();
                         if (file_exists($sSerializedFile)) {
                             $oPluginRegistry->unSerializeInstance(file_get_contents($sSerializedFile));
//.........这里部分代码省略.........
开发者ID:bqevin,项目名称:processmaker,代码行数:101,代码来源:CaseScheduler.php

示例6: LogicBoxes_Contract_Register

function LogicBoxes_Contract_Register($Settings, $PepsonID, $Person, $DomainZone)
{
    /****************************************************************************/
    $__args_types = array('array', 'string', 'array', 'string');
    #-----------------------------------------------------------------------------
    $__args__ = Func_Get_Args();
    eval(FUNCTION_INIT);
    /****************************************************************************/
    $Wsdl = System_Element('config/Wsdl/Customer.wsdl');
    if (Is_Error($Wsdl)) {
        return ERROR | @Trigger_Error(500);
    }
    #-----------------------------------------------------------------------------
    $AddCustomer = new SoapClient($Wsdl, array('exceptions' => 0));
    #-----------------------------------------------------------------------------
    $Params = array('SERVICE_USERNAME' => $Settings['Login'], 'SERVICE_PASSWORD' => $Settings['Password'], 'SERVICE_ROLE' => 'reseller', 'SERVICE_LANGPREF' => 'ru', 'SERVICE_PARENTID' => $Settings['ParentID'], 'customerUserName' => $Person['Email'], 'customerPassword' => UniqID());
    #-----------------------------------------------------------------------------
    switch ($PepsonID) {
        case 'Natural':
            #-------------------------------------------------------------------------
            $Params['name'] = SPrintF('%s %s %s', Translit($Person['Name']), Mb_SubStr(Translit($Person['Lastname']), 0, 1), Translit($Person['Sourname']));
            $Params['company'] = 'N/A';
            $Params['address1'] = Translit(SPrintF('%s %s', $Person['pType'], $Person['pAddress']));
            $Params['address2'] = Translit(SPrintF('%s %s', $Person['pType'], $Person['pAddress']));
            $Params['address3'] = Translit(SPrintF('%s %s', $Person['pType'], $Person['pAddress']));
            $Params['city'] = Translit($Person['pCity']);
            $Params['state'] = Translit($Person['pState']);
            $Params['country'] = isset($Person['PasportCountry']) ? $Person['PasportCountry'] : $Person['pCountry'];
            $Params['zip'] = $Person['pIndex'];
            break;
        case 'Juridical':
            #-------------------------------------------------------------------------
            $Params['name'] = SPrintF('%s %s %s', Translit($Person['dName']), Translit($Person['dLastname']), Translit($Person['dSourname']));
            $Params['company'] = SPrintF('%s %s', Translit($Person['CompanyName']), Translit($Person['CompanyFormFull']));
            $Params['address1'] = Translit(SPrintF('%s %s', $Person['jType'], $Person['jAddress']));
            $Params['address2'] = Translit(SPrintF('%s %s', $Person['pType'], $Person['pAddress']));
            $Params['address3'] = Translit(SPrintF('%s %s', $Person['pType'], $Person['pAddress']));
            $Params['city'] = Translit($Person['jCity']);
            $Params['state'] = Translit($Person['jState']);
            $Params['country'] = Translit($Person['jCountry']);
            $Params['zip'] = $Person['jIndex'];
            break;
        default:
            return ERROR | @Trigger_Error(400);
    }
    #-----------------------------------------------------------------------------
    $Phone = $Person['Phone'];
    #-----------------------------------------------------------------------------
    if ($Phone) {
        #---------------------------------------------------------------------------
        $Phone = Preg_Split('/\\s+/', $Phone);
        #---------------------------------------------------------------------------
        $Params['telNoCc'] = Trim(Current($Phone), '+');
        $Params['telNo'] = SPrintF('%s%s', Next($Phone), Next($Phone));
        #---------------------------------------------------------------------------
        Reset($Phone);
        #---------------------------------------------------------------------------
        $Params['altTelNoCc'] = Trim(Current($Phone), '+');
        $Params['altTelNo'] = SPrintF('%s%s', Next($Phone), Next($Phone));
    } else {
        #---------------------------------------------------------------------------
        $Params['telNoCc'] = '';
        $Params['telNo'] = '';
        $Params['altTelNoCc'] = '';
        $Params['altTelNo'] = '';
    }
    #-----------------------------------------------------------------------------
    $Fax = $Person['Fax'];
    #-----------------------------------------------------------------------------
    if ($Fax) {
        #---------------------------------------------------------------------------
        $Fax = Preg_Split('/\\s+/', $Fax);
        #---------------------------------------------------------------------------
        $Params['faxNoCc'] = Trim(Current($Fax), '+');
        $Params['faxNo'] = SPrintF('%s%s', Next($Fax), Next($Fax));
    } else {
        #---------------------------------------------------------------------------
        $Params['faxNoCc'] = '';
        $Params['faxNo'] = '';
    }
    #-----------------------------------------------------------------------------
    $Params['customerLangPref'] = 'ru';
    #-----------------------------------------------------------------------------
    Debug(Print_R($Params, TRUE));
    #-----------------------------------------------------------------------------
    $Response = $AddCustomer->__SoapCall('addCustomer', $Params);
    #-----------------------------------------------------------------------------
    if (Is_SOAP_Fault($Response)) {
        #---------------------------------------------------------------------------
        Debug($Response->faultstring);
        #---------------------------------------------------------------------------
        return new gException('ANSWER_ERROR', 'Ошибка обращения к регистратору');
    }
    #-----------------------------------------------------------------------------
    $CustomerID = $Response;
    #-----------------------------------------------------------------------------
    $Wsdl = System_Element('config/Wsdl/DomContact.wsdl');
    if (Is_Error($Wsdl)) {
        return ERROR | @Trigger_Error(500);
    }
//.........这里部分代码省略.........
开发者ID:carriercomm,项目名称:jbs,代码行数:101,代码来源:LogicBoxes.php

示例7: projectWsUserCanStartTask

 /**
  * Return the user that can start a task
  *
  * @param string $sProcessUID {@min 32} {@max 32}
  * @param string $sActivityUID {@min 32} {@max 32}
  * @param array  $oData
  *
  * return array
  *
  * @access public
  */
 public function projectWsUserCanStartTask($sProcessUID, $sActivityUID, $oData)
 {
     try {
         Validator::proUid($sProcessUID, '$prj_uid');
         /**
          * process_webEntryValidate
          * validates if the username and password are valid data and if the user assigned
          * to the webentry has the rights and persmissions required
          */
         $sTASKS = $sActivityUID;
         $sWS_USER = trim($oData['username']);
         $sWS_PASS = trim($oData['password']);
         if (\G::is_https()) {
             $http = 'https://';
         } else {
             $http = 'http://';
         }
         $endpoint = $http . $_SERVER['HTTP_HOST'] . '/sys' . SYS_SYS . '/' . SYS_LANG . '/' . SYS_SKIN . '/services/wsdl2';
         @($client = new \SoapClient($endpoint));
         $user = $sWS_USER;
         $pass = $sWS_PASS;
         $params = array('userid' => $user, 'password' => $pass);
         $result = $client->__SoapCall('login', array($params));
         $fields['status_code'] = $result->status_code;
         $fields['message'] = 'ProcessMaker WebService version: ' . $result->version . "\n" . $result->message;
         $fields['version'] = $result->version;
         $fields['time_stamp'] = $result->timestamp;
         $messageCode = 1;
         \G::LoadClass('Task');
         \G::LoadClass('User');
         \G::LoadClass('TaskUser');
         \G::LoadClass('Groupwf');
         /**
          * note added by gustavo cruz gustavo-at-colosa-dot-com
          * This is a little check to see if the GroupUser class has been declared or not.
          * Seems that the problem its present in a windows installation of PM however.
          * It's seems that could be replicated in a Linux server easily.
          * I recomend that in some way check already if a imported class is declared
          * somewhere else or maybe delegate the task to the G Class LoadClass method.
          */
         if (!class_exists('GroupUser')) {
             \G::LoadClass('GroupUser');
         }
         // if the user has been authenticated, then check if has the rights or
         // permissions to create the webentry
         if ($result->status_code == 0) {
             $oCriteria = new \Criteria('workflow');
             $oCriteria->addSelectColumn(\UsersPeer::USR_UID);
             $oCriteria->addSelectColumn(\TaskUserPeer::USR_UID);
             $oCriteria->addSelectColumn(\TaskUserPeer::TAS_UID);
             $oCriteria->addSelectColumn(\UsersPeer::USR_USERNAME);
             $oCriteria->addSelectColumn(\UsersPeer::USR_FIRSTNAME);
             $oCriteria->addSelectColumn(\UsersPeer::USR_LASTNAME);
             $oCriteria->addSelectColumn(\TaskPeer::PRO_UID);
             $oCriteria->addJoin(\TaskUserPeer::USR_UID, \UsersPeer::USR_UID, \Criteria::LEFT_JOIN);
             $oCriteria->addJoin(\TaskUserPeer::TAS_UID, \TaskPeer::TAS_UID, \Criteria::LEFT_JOIN);
             if ($sTASKS) {
                 $oCriteria->add(\TaskUserPeer::TAS_UID, $sTASKS);
             }
             $oCriteria->add(\UsersPeer::USR_USERNAME, $sWS_USER);
             $oCriteria->add(\TaskPeer::PRO_UID, $sProcessUID);
             $userIsAssigned = \TaskUserPeer::doCount($oCriteria);
             // if the user is not assigned directly, maybe a have the task a group with the user
             if ($userIsAssigned < 1) {
                 $oCriteria = new \Criteria('workflow');
                 $oCriteria->addSelectColumn(\UsersPeer::USR_UID);
                 $oCriteria->addSelectColumn(\UsersPeer::USR_USERNAME);
                 $oCriteria->addSelectColumn(\UsersPeer::USR_FIRSTNAME);
                 $oCriteria->addSelectColumn(\UsersPeer::USR_LASTNAME);
                 $oCriteria->addJoin(\UsersPeer::USR_UID, \GroupUserPeer::USR_UID, \Criteria::LEFT_JOIN);
                 $oCriteria->addJoin(\GroupUserPeer::GRP_UID, \TaskUserPeer::USR_UID, \Criteria::LEFT_JOIN);
                 $oCriteria->addJoin(\TaskUserPeer::TAS_UID, \TaskPeer::TAS_UID, \Criteria::LEFT_JOIN);
                 if ($sTASKS) {
                     $oCriteria->add(\TaskUserPeer::TAS_UID, $sTASKS);
                 }
                 $oCriteria->add(\UsersPeer::USR_USERNAME, $sWS_USER);
                 $oCriteria->add(\TaskPeer::PRO_UID, $sProcessUID);
                 $userIsAssigned = \GroupUserPeer::doCount($oCriteria);
                 if (!($userIsAssigned >= 1)) {
                     if ($sTASKS) {
                         throw new \Exception(\G::LoadTranslation("ID_USER_NOT_ID_ACTIVITY", array($sWS_USER, $sTASKS)));
                     } else {
                         throw new \Exception(\G::LoadTranslation("ID_USER_NOT_ACTIVITY", array($sWS_USER)));
                     }
                 }
             }
             $oDataset = \TaskUserPeer::doSelectRS($oCriteria);
             $oDataset->setFetchmode(\ResultSet::FETCHMODE_ASSOC);
             $oDataset->next();
//.........这里部分代码省略.........
开发者ID:emildev35,项目名称:processmaker,代码行数:101,代码来源:ProjectUser.php

示例8: jas_wsLogin

function jas_wsLogin()
{
    //--------------------------------
    try {
        global $sessionId;
        global $client;
        global $endpoint;
        $client = new SoapClient($endpoint);
        // defined in config.jas.php
        // login to admin/admin
        $pass = 'md5:' . md5('admin');
        $params = array(array('userid' => 'admin', 'password' => $pass));
        $result = $client->__SoapCall('login', $params);
        if ($result->status_code == 0) {
            $sessionId = $result->message;
        } else {
            die("Unable to connect to ProcessMaker." . "Error Number: " . $result->status_code . "Error Message: " . $result->message);
        }
    } catch (Exception $e) {
        die("error in wsLogin 201002141853 " . $e);
    }
}
开发者ID:Polygn,项目名称:JegasCRM,代码行数:22,代码来源:jas_api.php

示例9: ws_open_with_params

function ws_open_with_params($endpoint, $user, $pass)
{
    global $sessionId;
    global $client;
    $sessionId = '';
    @($client = new SoapClient($endpoint));
    $params = array('userid' => $user, 'password' => $pass);
    $result = $client->__SoapCall('login', array($params));
    if ($result->status_code == 0) {
        $sessionId = $result->message;
        return 1;
    }
    throw new Exception($result->message);
}
开发者ID:emildev35,项目名称:processmaker,代码行数:14,代码来源:wsClient.php

示例10: SoapClient

 /**
  * get the process Data from a process
  * @param  $proId process Uid
  * @return $result
  */
 function ws_processGetData($proId)
 {
     global $sessionId;
     global $client;
     $endpoint = PML_WSDL_URL;
     $client = new SoapClient($endpoint);
     $sessionId = '';
     $params = array('sessionId' => $sessionId, 'processId' => $proId);
     $result = $client->__SoapCall('processGetData', array($params));
     if ($result->status_code == 0) {
         return $result;
     }
     throw new Exception($result->message);
 }
开发者ID:nshong,项目名称:processmaker,代码行数:19,代码来源:class.processes.php

示例11: envioNomina

function envioNomina($usuario, $password, $app_uid, $id_sgn, $nomina)
{
    $user = $usuario;
    $pass = $password;
    $Endpoint = "http://staging.portal-excel.com:10080/sysworkflow/en/classic/services/wsdl2";
    $client = new SoapClient($Endpoint);
    $params = array('userid' => $user, 'password' => $pass);
    /*
     * On line 30, i call to process maker login web service
     * and if the call result is "ok", the code create a new path
     * and decode de $nomina parameter to get a file.
     */
    $result = $client->__SoapCall('login', array($params));
    if ($result->status_code == 0) {
        /******nomina sgn***************/
        $path = "/var/www/rest-excel/archivos/" . $id_sgn;
        mkdir($path, 770);
        shell_exec("chmod 770 {$path}");
        $pathFile = $path . "/" . $id_sgn . ".xls";
        $x = base64_decode($nomina);
        file_put_contents($pathFile, base64_decode($nomina));
        /*
         * On line 54 i create a new object of grandCreater class,
         * the grandCreater class parse a xml file and return an array from the data of the same file
         *
         *
         *
         *
         */
        require_once "/var/www/rest-excel/classExcel2.php";
        $class = new grandCreater();
        $location = $pathFile;
        $params = $class->grandReaderLayout($location);
        /*
         *
         * I send the inside the $location parameter, the file path that its going to by parse
         * to the grandReaderlayout method and return an multidimensional array
         *
         */
        $params = json_decode(json_encode($params), true);
        /*
         * From the array that the grandReaderLayout method return, I get the info of 
         * $rfc_Cliente and $rfc_Pagadora
         */
        $rfc_Cliente = $params[0]['RFC_CLIENTE'];
        $rfc_Pagadora = $params[0]['RFC_PAGADORA'];
        /*
         * On line 84 the  object of routeCaseSGN class is created,
         * on line 85 the object call a method of the routeCaseSGN class and send parameters
         *
         *
         */
        require_once "/var/www/rest-excel/consumeCaso.php";
        $route = new routeCaseSGN();
        /*
         *
         * I call  buscaNomina method from the routeCaseSGN Class and 
         * send four params and the  get the result of the method inside $execution variable
         *
         */
        $execution = $route->buscaNomina($rfc_Cliente, $rfc_Pagadora, $location, $params);
        return "El archivo se recibio correntamente" . print_r($execution, true) . print_r($result, true);
    } else {
        return "Error favor de revisar usuario o password";
    }
}
开发者ID:Santtiago,项目名称:test,代码行数:66,代码来源:bpm2.php

示例12: array

            //$query = "contacts.email1 != '' ";
            //$orderby = 'email1 desc ';
            $query = '';
            $orderby = '';
            $fields = array('id', 'first_name', 'last_name', 'account_name', 'account_id', 'email1', 'phone_work');
            $params = array($session, 'Leads', $query, $orderby, 0, $fields, 100, false);
            $res = $client->__SoapCall('get_entry_list', $params);
            krumo($res);
        }
        break;
    case 'processList':
        $wsdl = PATH_METHODS . "services" . PATH_SEP . "pmos.wsdl";
        $endpoint = $wsdl;
        $client = new SoapClient($endpoint);
        $params = array('sessionId' => $sessionId);
        $result = $client->__SoapCall('processesList', array($params));
        krumo($result);
        die;
        break;
    default:
        krumo($_POST);
        die;
}
?>
<div class="krumo-root">
	<ul class="krumo-node krumo-first">
		<li class="krumo-child">
			<div class="krumo-element">
				status_code (<em class="krumo-type">Integer</em>) <strong
					class="krumo-integer"><?php 
echo $result->error->number;
开发者ID:bqevin,项目名称:processmaker,代码行数:31,代码来源:demoSoap.php

示例13: getCustomerByIndToken

 public function getCustomerByIndToken($token)
 {
     $authResult = $this->getAuthToken();
     $xwebNamespace = $authResult['xwebNamespace'];
     $authToken = $authResult['authToken'];
     $input_headers = new SoapHeader($xwebNamespace, 'AuthorizationToken', array('Token' => $authToken), true);
     if ((bool) Mage::getStoreConfig('avectraconnect_options/avectraconfigfields/useliveurl')) {
         $function_name = $this->__prefixCall . "WEBWebUserValidateToken";
     } else {
         $function_name = "WEBWebUserValidateToken";
     }
     $arguments = array('parameters' => array('authenticationToken' => $token));
     $options = null;
     $org_name = '';
     $output_headers = null;
     define('WEBWebUserValidateTokenResult', 'WEBWebUserValidateTokenResult');
     try {
         $soapClientSetUp = array('trace' => true, 'exceptions' => false);
         $soap_client = new SoapClient($this->__token_path, $soapClientSetUp);
         //$soap_client = new SoapClient('http://10.30.1.210/' . $this->__token_path, $soapClientSetUp);
         $soapresponse = $soap_client->__SoapCall($function_name, $arguments, $options, $input_headers, $output_headers);
     } catch (Exception $e) {
         Mage::logException($e);
     }
     if ((bool) Mage::getStoreConfig('avectraconnect_options/avectraconfigfields/useliveurl')) {
         $methodPrefix = $this->__prefixCall . WEBWebUserValidateTokenResult;
         $WEBWebUserValidateTokenResult = $soapresponse->{$methodPrefix};
     } else {
         $WEBWebUserValidateTokenResult = $soapresponse->WEBWebUserValidateTokenResult;
     }
     if ($soapresponse && $WEBWebUserValidateTokenResult) {
         //load data from Avectra
         //Fetch the data from Avectra Response
         if ((bool) Mage::getStoreConfig('avectraconnect_options/avectraconfigfields/useliveurl')) {
             $responseTokenPrefix = $this->__prefixCall . WEBWebUserValidateTokenResult;
             $email = $soapresponse->{$responseTokenPrefix}->Email->eml_address;
             $avectraKey = $soapresponse->{$responseTokenPrefix}->Individual->ind_cst_key;
             $emailKey = isset($soapresponse->{$responseTokenPrefix}->Customer->cst_eml_key) ? $soapresponse->{$responseTokenPrefix}->Customer->cst_eml_key : '';
             $responseFirstName = $soapresponse->{$responseTokenPrefix}->Individual->ind_first_name;
             $responseLastName = $soapresponse->{$responseTokenPrefix}->Individual->ind_last_name;
             $responseCustomerNumber = $soapresponse->{$responseTokenPrefix}->Customer->cst_recno;
         } else {
             $email = $soapresponse->WEBWebUserValidateTokenResult->Email->eml_address;
             $avectraKey = $soapresponse->WEBWebUserValidateTokenResult->Individual->ind_cst_key;
             $emailKey = isset($soapresponse->WEBWebUserValidateTokenResult->Customer->cst_eml_key) ? $soapresponse->WEBWebUserValidateTokenResult->Customer->cst_eml_key : '';
             $responseFirstName = $soapresponse->WEBWebUserValidateTokenResult->Individual->ind_first_name;
             $responseLastName = $soapresponse->WEBWebUserValidateTokenResult->Individual->ind_last_name;
             $responseCustomerNumber = $soapresponse->WEBWebUserValidateTokenResult->Customer->cst_recno;
         }
         /*********************************************************** */
         if ($email) {
             $account = Mage::getModel('icc_avectra/account');
             $avectra = Mage::getModel('icc_avectra/avectraCommunication');
             $customer = $account->getByEmail($email);
             if ($customer) {
                 if ($avectra_key = $customer->getAvectraKey()) {
                     $user_info = $avectra->getUserInfo($avectra_key);
                 } else {
                     $user_info = $avectra->getUserInfoByEmail($email);
                 }
             } else {
                 $fields['customer_exists'] = 0;
                 $user_info = $avectra->getUserInfoByEmail($email);
             }
             if ($user_info) {
                 $data = false;
                 if (isset($user_info->IndividualObject)) {
                     $data = $user_info->IndividualObject;
                 } else {
                     if (isset($user_info->Individual)) {
                         $data = $user_info->Individual;
                     }
                 }
                 if ($data) {
                     $orgs = $avectra->getUserAffiliatedOrganizations($avectra_key, true);
                     if ($orgs) {
                         $org_name = $orgs[0]->Organization->org_name;
                     }
                 }
             }
         }
         $avectraData = array('firstname' => $responseFirstName, 'lastname' => $responseLastName, 'email' => $email, 'avectra_key' => $avectraKey, 'customer_no' => $responseCustomerNumber, 'email_avectra_key' => $emailKey, 'org_name' => $org_name);
         $validator = new Zend_Validate_EmailAddress();
         if (empty($email) || !$validator->isValid($email)) {
             return null;
         }
         //try getting customer by Avectra key in Magento
         $select = Mage::getModel('customer/customer')->getCollection()->addAttributeToSelect('*')->addAttributeToFilter('avectra_key', $avectraKey)->load();
         $customer = $select->getFirstItem();
         //no customer with this key in Magento
         if (!($customer && $customer->getId())) {
             //check if the email in Magento matches the one from Avectra
             $customer = Mage::getModel("customer/customer");
             $customer->setWebsiteId(Mage::app()->getWebsite()->getId());
             $customer->loadByEmail($email);
             if (!($customer && $customer->getId())) {
                 //Create new customer in Magento because it exists in Avectra
                 $customer = Mage::getModel('customer/customer');
                 $avectraData['password'] = substr(md5(rand()), 0, 10);
                 $customer->setWebsiteId(Mage::app()->getWebsite()->getId());
//.........这里部分代码省略.........
开发者ID:ankita-parashar,项目名称:magento,代码行数:101,代码来源:ICC_Avectra_Model_AvectraCommunication.php

示例14: trim

 * validates if the username and password are valid data and if the user assigned
 * to the process and task has the rights and persmissions required to create a cron task
 */
$sWS_USER = trim($_REQUEST['USERNAME']);
$sWS_PASS = trim($_REQUEST['PASSWORD']);
if (G::is_https()) {
    $http = 'https://';
} else {
    $http = 'http://';
}
$endpoint = $http . $_SERVER['HTTP_HOST'] . '/sys' . SYS_SYS . '/' . SYS_LANG . '/' . SYS_SKIN . '/services/wsdl2';
@($client = new SoapClient($endpoint));
$user = $sWS_USER;
$pass = $sWS_PASS;
$params = array('userid' => $user, 'password' => $pass);
$result = $client->__SoapCall('login', array($params));
$fields['status_code'] = $result->status_code;
$fields['message'] = 'ProcessMaker WebService version: ' . $result->version . "\n" . $result->message;
$fields['version'] = $result->version;
$fields['time_stamp'] = $result->timestamp;
$messageCode = $result->message;
if ($result->status_code == 0) {
    if (!class_exists('Users')) {
        require "classes/model/UsersPeer.php";
    }
    $oCriteria = new Criteria('workflow');
    $oCriteria->addSelectColumn('USR_UID');
    $oCriteria->add(UsersPeer::USR_USERNAME, $sWS_USER);
    $resultSet = UsersPeer::doSelectRS($oCriteria);
    $resultSet->next();
    $user_id = $resultSet->getRow();
开发者ID:nshong,项目名称:processmaker,代码行数:31,代码来源:cases_SchedulerValidateUser.php

示例15: isset

 if (isset($_POST['form']['ACTION'])) {
     $frm = $_POST['form'];
     $action = $frm['ACTION'];
     if (isset($_POST["epr"])) {
         $_SESSION['END_POINT'] = $_POST["epr"];
     }
     $defaultEndpoint = 'http://' . $_SERVER['SERVER_NAME'] . ':' . $_SERVER['SERVER_PORT'] . '/sys' . SYS_SYS . '/en/green/services/wsdl2';
     $endpoint = isset($_SESSION['END_POINT']) ? $_SESSION['END_POINT'] : $defaultEndpoint;
     $sessionId = isset($_SESSION['SESSION_ID']) ? $_SESSION['SESSION_ID'] : '';
     @($client = new SoapClient($endpoint));
     switch ($action) {
         case "Login":
             $user = $frm["USER_ID"];
             $pass = $frm["PASSWORD"];
             $params = array('userid' => $user, 'password' => $pass);
             $result = $client->__SoapCall('login', array($params));
             $_SESSION['WS_SESSION_ID'] = '';
             if ($result->status_code == 0) {
                 $_SESSION['WS_SESSION_ID'] = $result->message;
             }
             $G_PUBLISH = new Publisher();
             $fields['status_code'] = $result->status_code;
             $fields['message'] = 'ProcessMaker WebService version: ' . $result->version . "\n" . $result->message;
             $fields['version'] = $result->version;
             $fields['time_stamp'] = $result->timestamp;
             $G_PUBLISH->AddContent('xmlform', 'xmlform', 'setup/wsShowResult', null, $fields);
             G::RenderPage('publish', 'raw');
             break;
         case "ProcessList":
             $sessionId = $frm["SESSION_ID"];
             $params = array('sessionId' => $sessionId);
开发者ID:rodriquelca,项目名称:processmaker,代码行数:31,代码来源:webServicesAjax.php


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