-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
55 lines (38 loc) · 1.3 KB
/
index.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
include 'Segment.php';
include 'SoapClientWrapper.php';
include 'XMLParser.php';
include 'RequestHandler.php';
$url = 'https://testapi.lleego.com/prueba-tecnica/availability-price';
$options = array(
'uri' => 'http://schemas.xmlsoap.org/soap/envelope/',
'location' => $url,
'style' => SOAP_RPC,
'use' => SOAP_ENCODED,
'soap_version' => SOAP_1_1,
'cache_wsdl' => WSDL_CACHE_NONE,
'connection_timeout' => 15,
'trace' => 1,
'encoding' => 'UTF-8',
'exceptions' => true,
);
$soapClient = new SoapClientWrapper($options);
$xmlParser = new Parser();
$requestHandler = new RequestHandler($soapClient, $xmlParser);
?>
<html>
<body>
<form action='index.php' method='POST'>
<input type='hidden' name='sent' value='1' />
<input type='submit' value='Enviar petición'>
</form>
<?php
if (isset($_REQUEST["sent"]) and $_REQUEST["sent"] == '1') {
$flightList = $requestHandler->handleRequest('','');
print "<pre>";
print_r($flightList);
print "</pre>";
}
?>
</body>
</html>