-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathserver.php
55 lines (48 loc) · 2.1 KB
/
server.php
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
<?php
class server
{
private $alunos;
public function __construct()
{
$this->alunos = array(
'20172014040011' => 'A**** L*** B***** C****',
'20181014040032' => 'A***** M***** D* S****',
'20181014040007' => 'A**** R***** A***** C****',
'20172014040003' => 'D***** S**** A**** F******',
'20171014040040' => 'B***** H**** L*** R****',
'20172014040027' => 'E**** S***** D* S****',
'20181014040006' => 'G****** L**** A***** C****',
'20181014040027' => 'E****** B**** M**** C*****',
'20172014040040' => 'G**** R*** G**** J****',
'20181014040020' => 'IGOR ALISSON SILVA',
'20181014040008' => 'G***** L**** D* S****',
'20142014040302' => 'H**** J***** O****** A***** A*****',
'20181014040030' => 'J*** V*** D** S**** V******',
'20172014040031' => 'J*** P**** F**** D* S****',
'20181014040040' => 'J*** J**** D** S*****',
'20181014040014' => 'L***** T**** D* O**** J***',
'20162014040007' => 'J***** D* A****** C******',
'20181014040029' => 'L*** S**** G******',
'20162014040036' => 'M***** V****** D* S****',
'20172014040006' => 'L**** M***** D* S**** M*****',
'20162014040029' => 'M***** A*** D* F***** T***** M****',
'20181014040015' => 'P**** B******** D* C****',
'20181014040009' => 'P**** R**** V***** D* S****',
'20122014040073' => 'R***** P***** D* O**** S****',
'20181014040011' => 'S***** J***** S**** D* S****',
'20181014040025' => 'W****** C**** D* S****',
'20151014040016' => 'W***** E***** D* S**** A****',
);
}
public function getNomeEstudante($matricula)
{
if( isset($this->alunos[$matricula]) == 1 ) return $this->alunos[$matricula];
else throw new SoapFault('Matricula não encontrada', 401);
}
}
$params = array(
'uri' => 'localhost:8080/server.php',
);
$server = new SoapServer(NULL, $params);
$server->setClass('server');
$server->handle();