For Programmers: Free Programming Magazines  


Home > Archive > PHP Pear > October 2007 > ......fault code ...105...









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author ......fault code ...105...
francisco viola

2007-10-05, 7:04 pm

Hi!
Does someone know why the page script :

<?php
require_once 'XML/RPC/Server.php';

/*
* Declare the functions, etc.
*/
function returnTimes2($params) {
$obj = new some_class_name;
return $obj->returnTimes2($params);
}

class some_class_name {
function returnTimes2($params) {
$param = $params->getParam(0);

// This error checking syntax was added in Release 1.3.0
if (!XML_RPC_Value::isValue($param)) {
return $param;
}

$val = new XML_RPC_Value($param->scalarval() * 2, 'int');
return new XML_RPC_Response($val);
}
}

$some_object = new some_class_name;


/*
* Establish the dispatch map and XML_RPC server instance.
*/
$server = new XML_RPC_Server(
array(
'function_times2' => array(
'function' => 'returnTimes2'
),
'class_paamayim_nekudotayim_times2' => array(
'function' => 'some_class_name::returnTimes2'
),
'class_times2' => array(
'function' => array('some_class_name', 'returnTimes2')
),
'object_times2' => array(
'function' => array($some_object, 'returnTimes2')
),
),
1 // serviceNow
);
?>



gives us the following result:
...fault code ...105
.....XML error: Invalid document end at line 1...

see: http://foreignlanguagespace.com/xmlrpc.php

francisco
Abra sua conta no Yahoo! Mail, o único sem limite de espaço para armazenamento!
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com