TestGetPlot_50.php
1.16 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
<?php
require_once "Base/TestAbstract.php";
class TestGetPlot_50 extends TestAbstract
{
public function getAPI() {
return "getPlot";
}
public function getParams() {
return array(
"startTime" => "2008-01-01T00:00:00",
"stopTime" => "2008-01-02T00:00:00",
"missionID" => "ACE",
);
}
public function getDescription() {
return "Plot ACE data.";
}
public function getWSTypes() {
return array("SOAP");
}
protected function checkRESTResult($result) {
return array(
'success' => FALSE,
'message' => 'Not implemented',
);
}
protected function checkSOAPResult($result) {
if (empty($result)) {
return array(
'success' => FALSE,
'message' => 'Empty result',
);
}
if (empty($result->success)) {
return array(
'success' => FALSE,
'message' => 'Error during plot request',
);
}
if ($result->status != 'done') {
return array(
'success' => FALSE,
'message' => 'Status is not done ('.$obj->status.')',
);
}
if (empty($result->plotFileURL)) {
return array(
'success' => FALSE,
'message' => 'Missing plot file URL in result',
);
}
return array(
'success' => TRUE,
);
}
}
?>