Reply to Re: XML_RPC_Response fatal error: Call to undefined method kindof

Your name:

Reply:


Posted by Mike P2 on 05/17/07 19:56

On May 16, 4:04 pm, Mike P2 <sumguyovrt...@gmail.com> wrote:
> On May 16, 1:02 pm, Ming <minghu...@gmail.com> wrote:
>
>
>
> > I am new to php5 programming :)
>
> > I redirect users to another server to login. After they login
> > successfully, they will be redirected to test.php. The server provides
> > xml_rpc interface so I can communicate with it. After running my
> > scripts, I get this error:
>
> > Fatal error: Call to undefined method XML_RPC_Response::kindOf() in /
> > usr/share/PEAR/XML/RPC.php on line 1972
>
> > It seems it is these two lines that cause problems:
>
> > I do get some response from the server, though.
>
> > The followings are my scripts:
>
> > test.php
>
> > <?php
>
> > error_reporting(E_ALL);
> > ini_set('display_errors', true);
>
> > include("cwl.php");
>
> > $test=new cwl();
>
> > $test->test();
>
> > ?>
>
> > cwl.php
>
> > <?php
>
> > require 'XML/RPC.php';
> > error_reporting(E_ALL);
> > ini_set('display_errors', true);
>
> > class cwl{
>
> > private $cwlURL;
> > private $xmlrpcPath;
> > private $appID;
> > private $appIDPassword;
> > private $cwlClient;
> > private $sessionTicket;
> > private $params;
>
> > function __construct()
> > {
> > $this->appID='xxx';
> > $this->appIDPassword='xxx';
> > $this->xmlrpcPath='/path';
> > $this->cwlURL='someurl;
> > $this->sessionTicket=$_GET['ticket'];
> > $this->params=array( new XML_RPC_Value($this->sessionTicket,
> > 'string'));
> > $this->cwlClient=$this->getCWLClient();
> > }
>
> > private function getCWLClient()
> > {
> > $client=new XML_RPC_Client($this->xmlrpcPath, $this->cwlURL);
> > $client->setCredentials ($this->appID, $this->appIDPassword);
> > $client->setDebug(1);
> > return $client;
> > }
>
> > protected function makeCall($functionName)
> > {
> > $functionName='session.'.$functionName;
>
> > try
> > {
> > $msg = new XML_RPC_Message($functionName, $this->params);
> > $resp= new XML_RPC_Response(new XML_RPC_Value());
> > $resp= $this->cwlClient->send($msg);
> > return $resp;
>
> > }
> > catch (Exception $e)
> > {
> > $e->__toString();
> > }
> > }
>
> > public function test()
> > {
> > $val =new XML_RPC_Value();
> > $val = $this->makeCall('getIdentities');
>
> > //***************************
> > //It seems it the line below causes the problem
>
> > $data = XML_RPC_decode($val);
>
> cwl::makeCall() is probably not returning an XML_RPC_Value object.
> Refer to XML_RPC_Client::send() in XML/RPC.php to make sure it returns
> an XML_RPC_Value object.
>
> -Mike PII

Sorry, my post was delayed. Didn't see your follow-up until after it
went through.

-Mike PII

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация