473,594 Members | 2,663 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

XML_RPC_Respons e fatal error: Call to undefined method kindof

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_Respons e::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('displa y_errors', true);

include("cwl.ph p");

$test=new cwl();

$test->test();

?>
cwl.php

<?php

require 'XML/RPC.php';
error_reporting (E_ALL);
ini_set('displa y_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='someur l;
$this->sessionTicket= $_GET['ticket'];
$this->params=array ( new XML_RPC_Value($ this->sessionTicke t,
'string'));
$this->cwlClient=$thi s->getCWLClient() ;
}

private function getCWLClient()
{
$client=new XML_RPC_Client( $this->xmlrpcPath, $this->cwlURL);
$client->setCredentia ls ($this->appID, $this->appIDPassword) ;
$client->setDebug(1);
return $client;
}

protected function makeCall($funct ionName)
{
$functionName=' session.'.$func tionName;

try
{
$msg = new XML_RPC_Message ($functionName, $this->params);
$resp= new XML_RPC_Respons e(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('getI dentities');
//*************** ************
//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_numbe r']))
echo $data['employee_numbe r']."<br>";
else echo "Not an employee<br>";

}
}

?>

Any advice? Thanks,

May 16 '07 #1
3 2753
A quick follow-up:

Never mine. I got it fixed.

May 16 '07 #2
On May 16, 1:02 pm, Ming <minghu...@gmai l.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_Respons e::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('displa y_errors', true);

include("cwl.ph p");

$test=new cwl();

$test->test();

?>

cwl.php

<?php

require 'XML/RPC.php';
error_reporting (E_ALL);
ini_set('displa y_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='someur l;
$this->sessionTicket= $_GET['ticket'];
$this->params=array ( new XML_RPC_Value($ this->sessionTicke t,
'string'));
$this->cwlClient=$thi s->getCWLClient() ;
}

private function getCWLClient()
{
$client=new XML_RPC_Client( $this->xmlrpcPath, $this->cwlURL);
$client->setCredentia ls ($this->appID, $this->appIDPassword) ;
$client->setDebug(1);
return $client;
}

protected function makeCall($funct ionName)
{
$functionName=' session.'.$func tionName;

try
{
$msg = new XML_RPC_Message ($functionName, $this->params);
$resp= new XML_RPC_Respons e(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('getI dentities');

//*************** ************
//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

May 16 '07 #3
On May 16, 4:04 pm, Mike P2 <sumguyovrt...@ gmail.comwrote:
On May 16, 1:02 pm, Ming <minghu...@gmai l.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_Respons e::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('displa y_errors', true);
include("cwl.ph p");
$test=new cwl();
$test->test();
?>
cwl.php
<?php
require 'XML/RPC.php';
error_reporting (E_ALL);
ini_set('displa y_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='someur l;
$this->sessionTicket= $_GET['ticket'];
$this->params=array ( new XML_RPC_Value($ this->sessionTicke t,
'string'));
$this->cwlClient=$thi s->getCWLClient() ;
}
private function getCWLClient()
{
$client=new XML_RPC_Client( $this->xmlrpcPath, $this->cwlURL);
$client->setCredentia ls ($this->appID, $this->appIDPassword) ;
$client->setDebug(1);
return $client;
}
protected function makeCall($funct ionName)
{
$functionName=' session.'.$func tionName;
try
{
$msg = new XML_RPC_Message ($functionName, $this->params);
$resp= new XML_RPC_Respons e(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('getI dentities');
//*************** ************
//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

May 17 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
9970
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 MySQL-client-4.0.14-0 I would really appreciate it. MySQL-shared-4.0.14-0 MySQL-server-4.0.14-0 MySQL-devel-4.0.14-0
5
16515
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 a failure to have the GD library installed. However, my phpinfo() reports (in the Apache GD section): GD Support enabled GD Version bundled (2.0 compatible) GIF Read Support enabled PNG Support enabled
5
68811
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 choose ImageMagick because I've heard so much about it. I then decided to go with the inbuilt GD tools since I'm using PHP 4.3.3 that I compiled with --with-gd. I can use some of the image functions in PHP so why is this one undefined? What...
4
15338
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 MySql on WIN 2000. PHP is installed from the zip file. When serving php docs (code snippets below) I get the messages: "Fatal error: Call to undefined function mysql_connect() " "Fatal error: Call to undefined function mysql_pconnect() "
8
9989
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 fetchRow() on a non-object." What are the available options here? Am I supposed to check I have a real object whenever I perform
4
61392
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 C:\Inetpub\wwwroot\CertificateOccupancy\main.php on line 33 line 33: $conn = mssql_connect(toshibo,sa,ladeda) or die ("Could Not Connect to Database"); when trying to use mssql_connect. Info.php shows that the mssql module
2
6297
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 C:\php\PEAR\lib\MDB2.php on line 1921" My code is a simple submit processing form for a login page: <?php
9
5250
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 which was perfectly alright and worked well. But now PHP5 fails to run the same script without any modification!
0
3657
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 C:\AppServ\www\seeyouu \send_mail.php on line 22 why is PEAR_Error undefined? i'd already put the PEAR.php and Mail.php in a same directory but why the error message appear? appreciate if anyone can tell me.
0
7954
marktang
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
1
8016
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8244
tracyyun
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6669
agi2029
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
5836
isladogs
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
3871
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
3905
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2391
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1487
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.