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
| <?php
require_once('nusoap.php');
$server = new soap_server;
$server->register('hello');
$server->register('retrieveByType');
function hello($name) {
return 'Hello, ' . $name;
}
function retrieveByType($type) {
if ($type == 'trolling') {
$arr[0] = 'Donzai Deep Swimmer 5 1/4 inch';
$arr[1] = 'Yosubi Squid-like 4 inch';
$arr[2] = 'Fortunata Imperial High Action';
} else if ($type == 'casting') {
$arr[0] = 'Silver Spring Mirrors Size 00';
$arr[1] = 'Gold Spring Mirrors Size 0';
$arr[2] = 'Mini Minnow Blue';
} else {
$arr[0] = 'None found!';
}
return $arr;
}
$HTTP_RAW_POST_DATA = isset($HTTP_RAW_POST_DATA) ? $HTTP_RAW_POST_DATA : '';
$server->service($HTTP_RAW_POST_DATA);
?>
|