KalkulatorSOAP.php 1 php 2 3 interface Metody 4 { 5 public
Transkrypt
KalkulatorSOAP.php 1 php 2 3 interface Metody 4 { 5 public
KalkulatorSOAP.php
1 <?php
2
3 interface Metody
4{
5
public function Dodawanie();
6
public function Odejmowanie();
7
public function Mnozenie();
8
public function Dzielenie();
9}
10
11 class SOAP_Method implements Metody
12 {
13
private $ns;
14
private $SOAP;
15
16
public function __construct($soap_serwer, $ns)
17
{
18
$this->SOAP = $soap_serwer;
19
$this->ns = $ns;
20
}
21
22
public function Dodawanie()
23
{
24
$this->SOAP->register('Dodawanie', array (
25
'liczba_1' => 'xsd:integer',
26
'liczba_2' => 'xsd:integer' ), array (
27
'return' => 'xsd:integer' ), $this->ns,
28
}
29
30
public function Odejmowanie()
31
{
32
$this->SOAP->register('Odejmowanie', array (
33
'liczba_1' => 'xsd:integer',
34
'liczba_2' => 'xsd:integer' ), array (
35
'return' => 'xsd:integer' ), $this->ns,
36
}
37
38
public function Mnozenie()
39
{
40
$this->SOAP->register('Mnozenie', array (
41
'liczba_1' => 'xsd:integer',
42
'liczba_2' => 'xsd:integer' ), array (
43
'return' => 'xsd:integer' ), $this->ns,
44
}
45
46
public function Dzielenie()
47
{
48
$this->SOAP->register('Dzielenie', array (
49
'liczba_1' => 'xsd:integer',
50
'liczba_2' => 'xsd:integer' ), array (
51
'return' => 'xsd:integer' ), $this->ns,
52
}
53 }
54
55 ?>
Page 1
false, false, false, 'Dodawanie');
false, false, false, 'Odejmowanie');
false, false, false, 'Mnozenie');
false, false, false, 'Dzielenie');