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);
echo "<br>";
if (isset($data['student_number']))
echo $data['student_number']."<br>";
else echo "Not a student<br>";
if (isset($data['employee_number']))
echo $data['employee_number']."<br>";
else echo "Not an employee<br>";
}
}
?>
Any advice? Thanks, 3 2735
A quick follow-up:
Never mine. I got it fixed.
On May 16, 1:02 pm, Ming <minghu...@gmail.comwrote:
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
On May 16, 4:04 pm, Mike P2 <sumguyovrt...@gmail.comwrote:
On May 16, 1:02 pm, Ming <minghu...@gmail.comwrote:
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 This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: BT |
last post by:
Hi .. a newbie question.
I get the following error:
Fatal error: Call to undefined function: mysql_connect() in
/var/www/html/index.php on line 3.
I have the following RPMS installed on RH7.2...
|
by: Daniel Hansen |
last post by:
I am getting a "Fatal error: Call to undefined function:
imagecreatefromjpeg() in..." error in one of my scripts, and after doing
a bit of searching on the 'net I found various messages relating to...
|
by: Randell D. |
last post by:
Folks,
I feel like pulling my hair out - I tried unsuccessfully over the past few
days to install ImagMagick but because of version conflicts and missing
libraries I had to give up. I originally...
|
by: gc |
last post by:
I'm a PHP and MySQL newbie. I have a feeling a lot of you may have seen this
before. I'm teaching myself PHP/MySQL and trying to setup a guestbook. I'm
running latest versions of Apache, PHP and...
|
by: Tim Tyler |
last post by:
I'm getting fatal errors when executing code - and my error handler is
failing to trap them - so I get no stack backtrace :-(
The error I am getting is:
"Fatal error: Call to a member function...
|
by: Biffo |
last post by:
I have PHP Version 5.0.3 installed on Windows XP Pro with IIS as the
webserver. All is working well, except I get a -
Fatal error: Call to undefined function mssql_connect() in...
|
by: salvadorvp |
last post by:
Hi, I have the following code that gives me this odd error message at
a line of code inside the PEAR libraries:
"Fatal error: Call to undefined function:
MDB2_Driver_mssql::getMessage(). in...
|
by: java |
last post by:
Hey there,
I just removed an elderly PHP4-Installation from my Windows-Box and
installed PHP 5.2.1. I used the PHP4-Module as local batchfile-
interpreter by
E:\ersDHCP>php ./extractLog.php
...
|
by: youu917 |
last post by:
I'm trying to code a php page that can send a email automatically.
However, i don't understand the error message appeared: Fatal error:
Call to undefined method PEAR_Error::send() in...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new...
| |