[r7011]: tags / phpGedView-4.2.4 / phpGedView / serviceClientTest.php  Maximize  Restore  History

Download this file

109 lines (94 with data), 2.9 kB

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
<pre>
<?php
define('PGV_SCRIPT_NAME', 'serviceClientTest.php');
require './config.php';
ob_start();
require_once './SOAP/Client.php';
//-- put your URL here
$url = 'http://localhost/pgv/genservice.php?wsdl';
print "Getting WSDL<br />";
if (!class_exists('SoapClient')) {
print "Using PEAR:SOAP<br />";
$wsdl = new SOAP_WSDL($url);
print "Getting Proxy<br />";
$soap = $wsdl->getProxy();
}
else {
print "Using SOAP Extension<br />";
$soap = new SoapClient($url);
}
print "Getting ServiceInfo<br />\n";
$s = $soap->ServiceInfo();
var_dump($s);
print "After ServiceInfo()<br />";
$result = $soap->Authenticate('', '', '', '', 'GEDCOM');
var_dump($result);
print "After Authenticate<br />";
$res = $soap->getPersonById($result->SID, "I2");
var_dump($res);
print "After getPersonById<br />";
$res = $soap->getGedcomRecord($result->SID, "I2");
var_dump($res);
print "After getGedcomRecord<br />";
//$person = $soap->getPersonByID($result->SID, "I1");
//print_r($person);
//require_once PGV_ROOT.'includes/classes/class_grampsexport.php';
//$ge= new GrampsExport();
//$ge->begin_xml();
//$ge->create_family(find_family_record("F1", PGV_GED_ID), "F1", 1);
////$ge->create_person(find_person_record("I1", PGV_GED_ID), "I1", 1);
//$xml = $ge->dom->saveXML();
//print htmlentities($xml);
//
//$family = $soap->getFamilyByID($result->SID, "F1");
//print_r($family);
//$ids = $soap->checkUpdates($result->SID, "01 JAN 2006");
//print_r($ids);
//
print "Before Search";
$s = $soap->search($result->SID, 'NAME=father surname', '0','100');
var_dump($s);
print "After search";
//
//$res = $soap->getPersonById($result->SID, "I1");
//print_r($res);
//
/*************************************** getVar TESTS *********************************************/
/*$s = $soap->getVar($result->SID, 'GEDCOM');
print_r($s);
$s = $soap->getXref($result->SID, 'new', 'INDI');
print_r($s);
$s = $soap->checkUpdates($result->SID, '10 JAN 2005');
print_r($s);
*/
//
//$s = $soap->getVar($result->SID, 'CHARACTER_SET');
//print_r($s);
//
//$s = $soap->getVar($result->SID, 'PEDIGREE_ROOT_ID');
//print_r($s);
//
// The rest of these are examples that only work if you are
// actually authenticated as a user first not anonymously
//$s = $soap->getVar($result->SID, 'CALENDAR_FORMAT');
//print_r($s);
//
//$s = $soap->getVar($result->SID, 'LANGUAGE');
//print_r($s);
//
/************* THE REST OF THESE SCHOULD RETURN SOAP FAULTS SINCE THEY'RE NOT ALLOWED **********/
//$s = $soap->getVar($result->SID, 'DBTYPE');
//print_r($s);
//
//$s = $soap->getVar($result->SID, 'SERVER_URL');
//print_r($s);
/**************************************** END OF getVar TEST *************************************/
//
//$s = $soap->appendRecord($result->SID, 'RoyalBaseGarrett05.ged', $gedrec);
//print_r($s);
//
//$s = $soap->deleteRecord($result->SID, 'RoyalBaseGarrett05.ged');
//print_r($s);
ob_end_flush();
?>
</pre>

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks