webservice.php
2.72 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
<?php
$wsdl = "http://".$_SERVER['HTTP_HOST']."/webservice/webservice.php?class=CMISService&wsdl";
echo "<strong>WSDL file:</strong> ".$wsdl."<br>\n";
$options = Array('actor' =>'http://127.0.0.1',
'trace' => true);
$client = new SoapClient($wsdl,$options);
echo "<hr> <strong>Result from getrepositories call:</strong><br>";
$res = $client->getRepositories();
print_r($res);
echo "<hr><strong>Raw Soap response:</strong><br>";
echo htmlentities($client->__getLastResponse());
echo "<hr> <strong>Result from getrepositoryinfo call:</strong><br>";
$res = $client->getRepositoryInfo('1');
print_r($res);
echo "<hr><strong>Raw Soap response:</strong><br>";
echo htmlentities($client->__getLastResponse());
echo "<hr> <strong>Result from gettypes call:</strong><br>";
$res = $client->getTypes('1');
print_r($res);
echo "<hr><strong>Raw Soap response:</strong><br>";
echo htmlentities($client->__getLastResponse());
echo "<hr> <strong>Result from gettypedefinition (document) call:</strong><br>";
$res = $client->getTypeDefinition('1', 'Document');
print_r($res);
echo "<hr><strong>Raw Soap response:</strong><br>";
echo htmlentities($client->__getLastResponse());
echo "<hr> <strong>Result from gettypedefinition (folder) call:</strong><br>";
$res = $client->getTypeDefinition('1', 'Folder');
print_r($res);
echo "<hr><strong>Raw Soap response:</strong><br>";
echo htmlentities($client->__getLastResponse());
/*
echo "<hr> <strong>Result from getdescendants call:</strong><br>";
$res = $client->getDescendants('1', 'F1', false, false, 3);
print_r($res);
echo "<hr><strong>Raw Soap response:</strong><br>";
echo htmlentities($client->__getLastResponse());
echo "<hr> <strong>Result from getchildren call:</strong><br>";
$res = $client->getChildren('1', 'F1', false, false);
print_r($res);
echo "<hr><strong>Raw Soap response:</strong><br>";
echo htmlentities($client->__getLastResponse());
// *
// */
/*
echo "<hr> <strong>Result from getfolderparent call:</strong><br>";
$res = $client->getFolderParent('1', 'F566', false, false, false);
print_r($res);
echo "<hr><strong>Raw Soap response:</strong><br>";
echo htmlentities($client->__getLastResponse());
//echo "<hr><strong>Result from getobjectparents call:</strong><br>";
//
//$res = $client->getObjectParents('1', 'F566', false, false);
//print_r($res);
//echo "<hr><strong>Raw Soap response:</strong><br>";
//echo htmlentities($client->__getLastResponse());
echo "<hr><strong>Result from getobjectparents call:</strong><br>";
$res = $client->getProperties('1', 'F566', false, false);
print_r($res);
echo "<hr><strong>Raw Soap response:</strong><br>";
echo htmlentities($client->__getLastResponse());
*/
// TODO add test of returnToRoot? would need known existing folder other than DroppedDocuments (F566)
?>