• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP Zend_Soap_Client类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: indexAction

    public function indexAction() {
    	$code = $this->_getParam('code');

    	try {
	    	$url = 'http://10.0.0.75/soap-re-1.0.php?wsdl';
	    	$clientSOAP = new Zend_Soap_Client($url);
	    	$clientSOAP->sendCode($code);
    	}
    	catch (SoapFault $e) {
    		echo $e->__toString();
    	}
    }
开发者ID:nicolasgrancher,项目名称:EPX_AIV,代码行数:12,代码来源:LightController.php


示例2: clientAction

 public function clientAction()
 {
     $client = new Zend_Soap_Client($this->_WSDL_URI);
     $this->view->add_result = $client->math_add(11, 55);
     $this->view->logical_not_result = $client->logical_not(true);
     $this->view->sort_result = $client->simple_sort(array("d" => "lemon", "a" => "orange", "b" => "banana", "c" => "apple"));
 }
开发者ID:riteshsahu1981,项目名称:we,代码行数:7,代码来源:SoapController.php


示例3: authenticate

 public function authenticate()
 {
     $this->_authenticateSetup();
     $dbSelect = $this->_authenticateCreateSelect();
     $resultIdentities = $this->_authenticateQuerySelect($dbSelect);
     if (is_null($resultIdentities) || !isset($resultIdentities) || empty($resultIdentities)) {
         return $this->_authenticateValidateResultSet(array());
     }
     $config = Zend_Registry::get('config');
     $host = $config['auth']['adconnector']['host'];
     $salt = $config['auth']['adconnector']['salt'];
     $options = array('location' => $host, 'uri' => $host);
     $client = new Zend_Soap_Client($host, $options);
     $hash = md5($salt . $this->_identity . date('Y-m-d') . $this->_credential);
     $zendAuthCredentialMatchColumn = $this->_zendDb->foldCase('zend_auth_credential_match');
     $adConnectorAuthValues = array('userName' => $this->_identity, 'password' => $this->_credential, 'hash' => $hash);
     try {
         $adconnector_result = $client->Authenticate($adConnectorAuthValues);
     } catch (Exception $e) {
         return $this->_authenticateValidateResultSet(array());
     }
     $resultIdentity = array_shift($resultIdentities);
     $resultIdentity[$zendAuthCredentialMatchColumn] = $adconnector_result->AuthenticateResult->IsAuthenticated || $adconnector_result->AuthenticateResult->IsOldPassword;
     $resultIdentity['passwordExpired'] = false;
     if ($adconnector_result->AuthenticateResult->IsOldPassword) {
         $resultIdentity['passwordExpired'] = true;
     }
     $result = $this->_authenticateValidateResult($resultIdentity);
     return $result;
 }
开发者ID:knatorski,项目名称:SMS,代码行数:30,代码来源:AdConnector.php


示例4: getClient

 /**
  * Get the HTTP Client for communication with the VERS SOAP service.
  * @return Zend_Http_Client
  */
 public function getClient()
 {
     if (is_null($this->_client)) {
         $this->setClient(new Zend_Soap_Client($this->_wsdl));
         $this->_client->setSoapVersion(SOAP_1_1);
     }
     return $this->_client;
 }
开发者ID:newlongwhitecloudy,项目名称:OpenConext-manage,代码行数:12,代码来源:Client.php


示例5: testObjectResponse

 public function testObjectResponse()
 {
     $wsdl = $this->baseuri . "/server2.php?wsdl";
     $client = new Zend_Soap_Client($wsdl);
     $ret = $client->request("test", "test");
     $this->assertTrue($ret instanceof stdClass);
     $this->assertEquals("test", $ret->foo);
     $this->assertEquals("test", $ret->bar);
 }
开发者ID:SustainableCoastlines,项目名称:loveyourwater,代码行数:9,代码来源:OnlineTest.php


示例6: searchUsingWsdlFile

 /**
  * @test 
  */
 public function searchUsingWsdlFile()
 {
     $soapClient = new \Zend_Soap_Client($this->_getDomain() . $this->_getUrl() . '?wsdl');
     $result = $soapClient->search('symfony', 'php');
     $this->assertInstanceOf('stdClass', $result);
     $this->assertTrue($result->success);
     $this->assertNull($result->message);
     $this->assertInternalType('array', $result->results);
     $this->assertGreaterThan(0, count($result->results));
 }
开发者ID:niutech,项目名称:SOA,代码行数:13,代码来源:SearchControllerTest.php


示例7: testGetOptions

 public function testGetOptions()
 {
     if (!extension_loaded('soap')) {
         $this->markTestSkipped('SOAP Extension is not loaded');
     }
     $client = new Zend_Soap_Client();
     $this->assertTrue($client->getOptions() == array('encoding' => 'UTF-8', 'soap_version' => SOAP_1_2));
     $options = array('soap_version' => SOAP_1_1, 'wsdl' => dirname(__FILE__) . '/_files/wsdl_example.wsdl', 'classmap' => array('TestData1' => 'Zend_Soap_Client_TestData1', 'TestData2' => 'Zend_Soap_Client_TestData2'), 'encoding' => 'ISO-8859-1', 'uri' => 'http://framework.zend.com/Zend_Soap_ServerTest.php', 'location' => 'http://framework.zend.com/Zend_Soap_ServerTest.php', 'use' => SOAP_ENCODED, 'style' => SOAP_RPC, 'login' => 'http_login', 'password' => 'http_password', 'proxy_host' => 'proxy.somehost.com', 'proxy_port' => 8080, 'proxy_login' => 'proxy_login', 'proxy_password' => 'proxy_password', 'local_cert' => dirname(__FILE__) . '/_files/cert_file', 'passphrase' => 'some pass phrase', 'compression' => SOAP_COMPRESSION_ACCEPT | SOAP_COMPRESSION_GZIP | 5);
     $client->setOptions($options);
     $this->assertTrue($client->getOptions() == $options);
 }
开发者ID:lortnus,项目名称:zf1,代码行数:11,代码来源:ClientTest.php


示例8: getSoapClient

 public static function getSoapClient()
 {
     ini_set("soap.wsdl_cache_enabled", "0");
     $conf = Zend_Registry::get("pimcore_config_test");
     $user = User::getById($conf->user);
     if (!$user instanceof User) {
         throw new Exception("invalid user id");
     }
     $client = new Zend_Soap_Client($conf->webservice->wsdl . "&username=" . $user->getUsername() . "&apikey=" . $user->getPassword(), array("cache_wsdl" => false, "soap_version" => SOAP_1_2, "classmap" => Webservice_Tool::createClassMappings()));
     $client->setLocation($conf->webservice->serviceEndpoint . "?username=" . $user->getUsername() . "&apikey=" . $user->getPassword());
     return $client;
 }
开发者ID:ngocanh,项目名称:pimcore,代码行数:12,代码来源:Tool.php


示例9: clientAction

 public function clientAction()
 {
     //need to consume other webservices
     $client = new Zend_Soap_Client("http://webteam/soap?wsdl");
     $result1 = $client->ValidateUser("admin1", "pass1");
     $this->view->result1 = $result1;
     $client2 = new Zend_Soap_Client("http://webteam/soap?wsdl");
     $result2 = $client2->CreateStream($result1, "title", "description");
     $this->view->result2 = $result2;
     $client3 = new Zend_Soap_Client("http://webteam/soap?wsdl");
     $result3 = $client3->VerifyStream("admin1", $result2);
     $this->view->result3 = $result3;
 }
开发者ID:BGCX067,项目名称:fall2011-cis553-svn-to-git,代码行数:13,代码来源:SoapController.php


示例10: GetImagemSoap

 /**
  * Helper para pegar as imagens do webservice
  *
  */
 public function GetImagemSoap($id)
 {
     // initialize SOAP client
     $options = array('location' => 'http://painel.local/webservice/index', 'uri' => 'http://painel.local/webservice/index');
     try {
         $client = new Zend_Soap_Client(null, $options);
         return $client->getImageById($id);
     } catch (SoapFault $s) {
         die('ERROR: [' . $s->faultcode . '] ' . $s->faultstring);
     } catch (Exception $e) {
         die('ERROR: ' . $e->getMessage());
     }
 }
开发者ID:powman,项目名称:zfpadrao,代码行数:17,代码来源:GetImagemSoap.php


示例11: performRequest

 public function performRequest($wsdl, $operation, $params, $options = array('encoding' => 'UTF-8'), $fullReponse = false)
 {
     if (!extension_loaded('soap')) {
         return 'Extension SOAP not found';
     }
     if (!isset($options['soap_version'])) {
         $options['soap_version'] = SOAP_1_1;
     }
     $client = new Zend_Soap_Client($wsdl, $options);
     $soap_params = array();
     foreach ($params as $param_name => $param_value) {
         preg_match('/^(.*)\\:(.*)$/', $param_name, $matches);
         if (count($matches) == 3) {
             if (!isset($soap_params[$matches[1]])) {
                 $soap_params[$matches[1]] = array();
             }
             $soap_params[$matches[1]][$matches[2]] = $param_value;
         } else {
             $soap_params[$param_name] = $param_value;
         }
     }
     try {
         // Set (Session) cookies before the call
         if ($this->allowCookies) {
             if (is_array($this->cookies)) {
                 foreach ($this->cookies as $cookieName => $cookieValue) {
                     $client->setCookie($cookieName, $cookieValue[0]);
                 }
             }
         }
         // Perform the SOAP request
         $result = call_user_func_array(array($client, $operation), $soap_params);
         // Pick up any new cookies from the server
         if ($this->allowCookies) {
             $last_response = $client->getLastResponseHeaders();
             $soapClt = $client->getSoapClient();
             $this->cookies = array_merge($soapClt->_cookies, $this->cookies);
         }
     } catch (SoapFault $e) {
         trigger_error($e->getMessage());
         return $e->getMessage();
     }
     // Unless the full response result is specified, only reply the returned result, and not the "out" parameter results
     if (is_object($result) && !$fullReponse) {
         $result_name = $operation . 'Result';
         if (isset($result->{$result_name})) {
             return $result->{$result_name};
         }
     }
     return $result;
 }
开发者ID:jkimdon,项目名称:cohomeals,代码行数:51,代码来源:soaplib.php


示例12: processTest

 private function processTest()
 {
     $client = new Zend_Soap_Client($this->url('soapserver|soap|WSDL'));
     $client->setWsdlCache(false);
     $class1 = new soapClassModel();
     $class1->name = 'Vasi Tavue';
     $class1->accountId = 1;
     $class1->classId = 6;
     $class1->level = array(7);
     $class1->type = 8;
     $class1->year = 2011;
     $class1->validityDate = '2013-08-31';
     $class = new soapClassModel();
     $class->name = 'Vasi Tavue';
     $class->accountId = 1;
     $class->classId = 6;
     $class->level = array(7);
     $class->type = 8;
     $class->year = 2011;
     $class->validityDate = '2013-08-31';
     $directeur = new soapDirectorModel();
     $directeur->name = "jeanClaude";
     $directeur->surname = "leCompte";
     $directeur->mail = "[email protected]";
     $directeur->gender = 1;
     $adress = new soapAddressModel();
     $adress->address = "4 rue des cochons";
     $adress->additionalAddress = "";
     $adress->city = "Larochelle";
     $adress->postalCode = "76788";
     $school = new soapSchoolModel();
     $school->name = "DesChamps";
     $school->address = $adress;
     $school->director = $directeur;
     $account = new soapAccountModel();
     $account->id = 1;
     $account->school = $school;
     try {
         $j = $client->createAccount($account);
         $i = $client->createClass($class);
         $k = $client->validateClass($class1);
     } catch (Exception $e) {
         echo $e;
     }
     echo '===';
     var_dump($i);
     var_dump($j);
     var_dump($k);
     return _arNone();
 }
开发者ID:JVS-IS,项目名称:ICONITO-EcoleNumerique,代码行数:50,代码来源:soap.actiongroup.php


示例13: soapcreateuserAction

	public function soapcreateuserAction() 
	{
		$client = new Zend_Soap_Client('http://front.zend.local/Wsserver/index/soap?wsdl');
		$client->setHttpLogin('test2')
			   ->setHttpPassword('test');
		$userData = array( 'login' => testSoap,
						   'password' => sha1( 'soap' ),
						   'nom' => 'WS',
						   'prenom' => 'SOAP11',
						   'telephone' => '00000000',
						   'email' => 'jhkljhl',
		                   'civilite' => 'M');

		$return = $client->create( $userData  );
		var_dump( $return ); exit;
	}
开发者ID:neotok,项目名称:front,代码行数:16,代码来源:indexController.php


示例14: _initSoapClient

 /**
  * Init Soap client - connect to SOAP service
  *
  * @param  string $endpoint
  * @throws Zend_Service_LiveDocx_Exception
  * @return void
  * @since  LiveDocx 1.2
  */
 protected function _initSoapClient($endpoint)
 {
     try {
         #require_once 'Zend/Soap/Client.php';
         $this->_soapClient = new Zend_Soap_Client();
         $this->_soapClient->setWsdl($endpoint);
     } catch (Zend_Soap_Client_Exception $e) {
         #require_once 'Zend/Service/LiveDocx/Exception.php';
         throw new Zend_Service_LiveDocx_Exception('Cannot connect to LiveDocx service at ' . $endpoint, 0, $e);
     }
 }
开发者ID:hirentricore,项目名称:devmagento,代码行数:19,代码来源:LiveDocx.php


示例15: callCompileService

 static function callCompileService($sourceCode)
 {
     try {
         My_Logger::log(__METHOD__ . " " . $sourceCode);
         $url = "http://localhost:8086/CompilerService/services/CompilerService?wsdl";
         $client = new Zend_Soap_Client($url, array('encoding' => 'UTF-8'));
         $arg = new stdClass();
         $arg->sourceCode = "public " . $sourceCode;
         //$arg->b = 11;
         $res = $client->compile($arg);
         My_Logger::log(__METHOD__ . " " . print_r($res, true));
         //print_r($res);
         return $res->return;
     } catch (Exception $e) {
         $msg = $e->getMessage();
         My_Logger::log(__METHOD__ . " service returned error: " . $msg);
         $cex = new CompilerException("Compiler service found errors: ");
         $cex->compiler_output = $msg;
         throw $cex;
     }
 }
开发者ID:sutantyo,项目名称:itec810,代码行数:21,代码来源:Compiler.php


示例16: clientAction

 public function clientAction()
 {
     //        return;
     $mtime = microtime();
     $mtime = explode(" ", $mtime);
     $mtime = $mtime[1] + $mtime[0];
     $starttime = $mtime;
     ini_set("soap.wsdl_cache_enabled", 0);
     $client = new Zend_Soap_Client("http://sms.loc/ws/sms?wsdl");
     try {
         $data = $client->text('C22CWF', "a3gtniwerfawkdhnako", '48510066024', 'test');
         debug($data);
     } catch (SoapFault $s) {
         var_dump("SOAP Fault: (faultcode: {$s->faultcode}, faultstring: {$s->faultstring})");
     } catch (Exception $e) {
         print "EXC:\n";
         var_dump($e->getMessage());
     }
     if ($client instanceof Zend_Soap_Client) {
         print "<pre>\n";
         print "Request :\n" . htmlspecialchars($client->getLastRequest()) . "\n";
         print "Response:\n" . htmlspecialchars($client->getLastResponse()) . "\n\n";
         print "Request:\n" . $client->getLastRequestHeaders() . "\n";
         print "Response:\n" . $client->getLastResponseHeaders() . "\n";
         print "</pre>";
     }
     $mtime = microtime();
     $mtime = explode(" ", $mtime);
     $mtime = $mtime[1] + $mtime[0];
     $endtime = $mtime;
     $totaltime = $endtime - $starttime;
     echo "<br /><h3>This page was created in " . $totaltime . " seconds</h3>";
 }
开发者ID:knatorski,项目名称:SMS,代码行数:33,代码来源:WsController.php


示例17: getSoapClient

 /**
  * returns the internal soap client
  * if not allready exists we create an instance of
  * Zend_Soap_Client
  *
  * @final
  * @return Zend_Service_DeveloperGarden_Client_Soap
  */
 public final function getSoapClient()
 {
     if ($this->_soapClient === null) {
         /**
          * init the soapClient
          */
         $this->_soapClient = new Zend_Service_DeveloperGarden_Client_Soap($this->getWsdl(), $this->getClientOptions());
         $this->_soapClient->setCredential($this->_credential);
         $tokenService = new Zend_Service_DeveloperGarden_SecurityTokenServer(array('username' => $this->_credential->getUsername(), 'password' => $this->_credential->getPassword(), 'environment' => $this->getEnvironment(), 'realm' => $this->_credential->getRealm()));
         $this->_soapClient->setTokenService($tokenService);
     }
     return $this->_soapClient;
 }
开发者ID:heiglandreas,项目名称:zf2,代码行数:21,代码来源:AbstractClient.php


示例18: endDocument

 /**
  * Finaliza o processo de impressao, enviando o documento para
  * impressora ou arquivo
  *
  * @return boolean
  * @throws ZendT_Exception_Error 
  */
 public function endDocument()
 {
     if (!$this->_idDocument) {
         throw new ZendT_Exception_Error('Para executar esse procedimento e preciso chamar os métodos startDocument e addContent ');
     }
     if ($this->_output == 'pdf') {
         $client = new Zend_Http_Client($this->_uriPhp . 'wsPrintServer/Pdf.php?IdDocument=' . $this->_idDocument, array('timeout' => 10 * 60));
         $response = $client->request();
         $pdf = $response->getBody();
         $pos = strpos($pdf, '%PDF');
         if (!$pos) {
             $pos = 0;
         }
         return substr($pdf, $pos);
     } elseif ($this->_output == 'raw') {
         $client = new Zend_Http_Client($this->_uriPhp . 'wsPrintServer/Raw.php?IdDocument=' . $this->_idDocument, array('timeout' => 10 * 60));
         $response = $client->request();
         return $response->getBody();
     } else {
         $param = array();
         $param['pIdDocument'] = $this->_idDocument;
         $result = $this->_client->EndDocument($param);
         if ($result->EndDocumentResult->ErrorCode) {
             throw new ZendT_Exception_Error('(' . $result->EndDocumentResult->ErrorCode . ') :: ' . $result->EndDocumentResult->ErrorMessage . ' :: Erro ao iniciar processo de impressão. ');
         } else {
             return true;
         }
     }
 }
开发者ID:rtsantos,项目名称:mais,代码行数:36,代码来源:Printer.php


示例19: __construct

    /**
     * Constructor
     *
     * @param string $wsdl
     * @param array $options
     */
    public function __construct($wsdl = null, $options = null)
    {
        // Use SOAP 1.1 as default
        $this->setSoapVersion(SOAP_1_1);

        parent::__construct($wsdl, $options);
    }
开发者ID:nhp,项目名称:shopware-4,代码行数:13,代码来源:DotNet.php


示例20: getValueToDb

 public function getValueToDb()
 {
     //$_server = new Ged_Service_FileSystem();
     $param = new Ged_Service_FileSystem_ParamWrite();
     if ($this->_value instanceof ZendT_File) {
         $param->fileName = $this->_value->getName();
         $param->fileContent = base64_encode($this->_value->getContent());
         $param->fileId = $this->_options['id'];
         $param->userId = $this->_options['user_id'];
         $param->parentId = $this->_options['parent_id'];
         $param->typeId = $this->_options['type_id'];
         $param->desc = $this->_options['desc'];
         $param->propName = $this->_options['prop_docto_name'];
         $param->userInc = Zend_Auth::getInstance()->getStorage()->read()->getId();
         $_result = $this->_client->write('0ac618c3e7d9012b', $param, 'base64');
         if ($_result->success == 0) {
             throw new ZendT_Exception($_result->message->message, $_result->message->code);
         }
         return $_result->id;
     } else {
         if ($this->_valueDb) {
             return $this->_valueDb;
         } else {
             if ($this->_options['id']) {
                 $_result = $this->_client->remove('0ac618c3e7d9012b', $this->_options['id'], 1);
                 if ($_result->success == 0) {
                     throw new ZendT_Exception($_result->message->message, $_result->message->code);
                 }
             }
             return null;
         }
     }
 }
开发者ID:rtsantos,项目名称:mais,代码行数:33,代码来源:FileSystem.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP Zend_Soap_Server类代码示例发布时间:2022-05-23
下一篇:
PHP Zend_Session_Namespace类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap