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


PHP nusoap_client::serializeEnvelope方法代码示例

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


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

示例1: UserAccountStatus

 function UserAccountStatus()
 {
     $contents = '<GetAccountStatus xmlns="https://vesta.ecordia.com"><submission xmlns:a="http://optimizer.ecordia.com/types/" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><a:ApiKey>' . $this->apiKey . '</a:ApiKey></submission></GetAccountStatus>';
     $contents = $this->client->serializeEnvelope($contents);
     $endpoint = 'https://vesta.ecordia.com/IUserManagement/GetAccountStatus';
     $results = $this->client->send($contents, $endpoint, 0, 180);
     $this->results = $results;
     $this->requestHasBeenExecuted = true;
 }
开发者ID:simpsonjulian,项目名称:puppet-wordpress,代码行数:9,代码来源:ecordia-user-account.class.php

示例2: GetAlternateKeywords

    function GetAlternateKeywords($keyword)
    {
        $contents = '
		<GetKeywordAlternates xmlns="https://vesta.ecordia.com">
			<request xmlns:a="http://optimizer.ecordia.com/types/" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
				<a:ApiKey>' . $this->apiKey . '</a:ApiKey>
				<a:SeedTerm>' . $keyword . '</a:SeedTerm>
			</request>
		</GetKeywordAlternates>
		';
        $contents = $this->client->serializeEnvelope($contents);
        $endpoint = 'https://vesta.ecordia.com/IContentAnalysis/GetKeywordAlternates';
        $results = $this->client->send($contents, $endpoint, 0, 180);
        $this->results = $results;
        $this->requestHasBeenExecuted = true;
    }
开发者ID:hscale,项目名称:webento,代码行数:16,代码来源:ecordia-keyword-alternates.class.php

示例3: GetAnalysis

    function GetAnalysis($title, $description, $content, $url)
    {
        $contents = '
		<GetAnalysis xmlns="https://vesta.ecordia.com">
			<request xmlns:a="http://optimizer.ecordia.com/types/" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
				<a:ApiKey>' . $this->apiKey . '</a:ApiKey>
				<a:DocumentBody><![CDATA[' . $content . ']]></a:DocumentBody>
				<a:DocumentDescription><![CDATA[' . $description . ']]></a:DocumentDescription>
				<a:DocumentSampleUrl><![CDATA[' . $url . ']]></a:DocumentSampleUrl>
				<a:DocumentTitle><![CDATA[' . $title . ']]></a:DocumentTitle>
			</request>
		</GetAnalysis>
		';
        $contents = $this->client->serializeEnvelope($contents);
        $endpoint = 'https://vesta.ecordia.com/IContentAnalysis/GetAnalysis';
        $results = $this->client->send($contents, $endpoint, 0, 180);
        $this->results = $results;
        $this->requestHasBeenExecuted = true;
    }
开发者ID:nhatnam1102,项目名称:wp-content,代码行数:19,代码来源:ecordia-content-optimizer.class.php

示例4: GetSearchEngineLinks

 function GetSearchEngineLinks($terms, $searchType, $url)
 {
     $termText = '';
     foreach ($terms as $term) {
         $termText .= "<b:string><![CDATA[{$term}]]></b:string>";
     }
     $contents = '<GetSearchEngineResults xmlns="https://vesta.ecordia.com">
         <request xmlns:a="http://optimizer.ecordia.com/types/" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
             <a:ApiKey>' . $this->apiKey . '</a:ApiKey>
             <a:SearchTerms xmlns:b="http://schemas.microsoft.com/2003/10/Serialization/Arrays">' . $termText . '</a:SearchTerms>
             <a:SearchType>' . $searchType . '</a:SearchType>
             <a:SubjectUrl><![CDATA[' . $url . ']]></a:SubjectUrl>
         </request>
     </GetSearchEngineResults>';
     $contents = $this->client->serializeEnvelope($contents);
     $endpoint = 'https://vesta.ecordia.com/IContentAnalysis/GetSearchEngineResults';
     $results = $this->client->send($contents, $endpoint, 0, 180);
     $this->results = $results;
     $this->requestHasBeenExecuted = true;
 }
开发者ID:hscale,项目名称:webento,代码行数:20,代码来源:ecordia-link-building-research.class.php

示例5: call

 /**
  * Internal utility methods
  */
 private function call($service, $method, $params)
 {
     ini_set('memory_limit', '1024M');
     ini_set('max_execution_time', 1800);
     set_time_limit(0);
     $url = $this->wsdl_root . $service . '.asmx?wsdl';
     $timeout = 3000;
     $cache = new nusoap_wsdlcache($this->cache_dir, $timeout);
     $wsdl = $cache->get($url);
     // Set the WSDL
     if (is_null($wsdl)) {
         $wsdl = new wsdl($url, NULL, NULL, NULL, NULL, 0, $timeout, NULL, TRUE);
         $error = $wsdl->getError();
         $debug = $wsdl->getDebug();
         $wsdl->clearDebug();
         // Check for SOAP errors
         if (!empty($error)) {
             $this->errors[] = $error;
             if ($debug) {
                 $this->errors[] = '<pre>' . print_r($debug, TRUE) . '</pre>';
             }
             return FALSE;
         }
         $cache->put($wsdl);
     }
     // Send the SOAP request
     $params['securityPassword'] = $this->wsdl_keys[$service];
     $client = new nusoap_client($wsdl, 'wsdl', FALSE, FALSE, FALSE, FALSE, 0, $timeout);
     $client->setDebugLevel(0);
     // 0 - 9, where 0 is off
     $client->useHTTPPersistentConnection();
     if ($service == 'DataAccess' && $method == 'ExecuteStoredProcedure') {
         /*
          * See http://www.codingforums.com/archive/index.php/t-85260.html
          * and http://users.skynet.be/pascalbotte/rcx-ws-doc/nusoapadvanced.htm
          * for how to thwart the "got wsdl error: phpType is struct, but value is not an array"
          * error returned by nusoap when processing the response from $client->call()
          *
          * */
         $request = $client->serializeEnvelope(vsprintf('<ExecuteStoredProcedure xmlns="http://ibridge.isgsolutions.com/%s/">
                   <securityPassword>%s</securityPassword>
                   <name>%s</name>
                   <parameters>%s</parameters>
                   </ExecuteStoredProcedure>', array($service, $params['securityPassword'], $params['name'], $params['parameters'])));
         $response = $client->send($request, 'http://ibridge.isgsolutions.com/' . $service . '/' . $method, 0, $timeout);
     } else {
         $response = $client->call($method, $params);
     }
     $error = $client->getError();
     $debug = $client->getDebug();
     $client->clearDebug();
     // Check for SOAP errors
     if (!empty($error)) {
         $this->errors[] = $error;
         if ($debug) {
             $this->errors[] = '<pre>' . print_r($debug, TRUE) . '</pre>';
         }
         return FALSE;
     }
     // Process response
     $response = $response[$method . 'Result'];
     $data = NULL;
     if (strpos($response, '<') == 0) {
         // Some ISGweb methods return strings instead of XML
         libxml_use_internal_errors(TRUE);
         $response = preg_replace('/(<\\?xml[^?]+?)utf-16/i', '$1utf-8', $response);
         // Change encoding string to UTF8
         $response = utf8_encode($response);
         $response = $this->strip_invalid_xml($response);
         $obj = simplexml_load_string($response);
         $data = $response;
         $error = libxml_get_errors();
         // Check for XML parsing errors
         if (!empty($error)) {
             foreach ($error as $e) {
                 $this->errors[] = $e;
             }
             libxml_clear_errors();
             return FALSE;
         }
         $data = $this->object_to_array($obj);
         // Check for ISGweb errors (e.g. invalid data input, failure of service, etc.)
         if (array_key_exists('Errors', $data)) {
             $error = $data['Errors'];
             foreach ($error as $e) {
                 $this->errors[] = $e['@attributes']['Description'];
             }
             return FALSE;
         }
     } else {
         $data = $response;
     }
     return $data;
 }
开发者ID:natemow,项目名称:samples,代码行数:97,代码来源:class.isgweb_wrapper.php


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