-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsoap_country.php
More file actions
48 lines (35 loc) · 1.1 KB
/
Copy pathsoap_country.php
File metadata and controls
48 lines (35 loc) · 1.1 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
<?php
error_reporting(E_ERROR);
ini_set('display_errors', 0);
require_once('connection.php');
require_once('nusoap/nusoap.php');
include 'dao_functions.php';
nusoap_base::setGlobalDebugLevel(o);
$server = new soap_server();
$server->setDebugLevel(o);
$server->configureWSDL('WORLDwsdl', 'urn:WORLDwsdl');
include 'soap_world_types.php';
$server->register('findCountry', // method name
array(
'continent' => 'xsd:string',
), // input parameters
array(
'return' => 'tns:ArrayOfCountry'
), // output parameters
'urn:WORLDwsdl', // namespace
'urn:WORLDwsdl#findCountry', // soapaction
'rpc', // style
'encoded', // use
'Find countries by continent' // documentation
);
function findCountry($continent) {
error_log("[soap_country.php] findCountry(" . $continent . ")");
global $server;
if (strlen($continent) < 4) {
return $server->fault("Invalid continent.");
}
return dao_country_find($continent);
}
$HTTP_RAW_POST_DATA = isset($HTTP_RAW_POST_DATA) ? $HTTP_RAW_POST_DATA : '';
$server->service($HTTP_RAW_POST_DATA);
?>