1:
<?php
2:
// Pull in the NuSOAP code
3:
require_once('../../nusoap/nusoap.php');
4:
5:
$endpoint = "http://server";
6:
7:
$client = new nusoap_client($endpoint, false);
8:
9:
$msg = $client->serializeEnvelope("<?xml version='1.0' encoding='UTF-8'?>
10:
<SOAP-ENV:Envelope xmlns:SOAP-ENV='http://schemas.xmlsoap.org/soap/envelope/' xmlns='http://site' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'>
11:
<SOAP-ENV:Header/>
12:
<SOAP-ENV:Body>
13:
<Request code='username' passphrase='password' service='serversearch' version='1.2' xsi:schemaLocation='http://site'>
14:
<Search>
15:
<Traveller id='t1'/>
16:
<HotelSearch>
17:
<Bound>
18:
<Origin iata='CPH'/>
19:
<Destination iata='BCN'/>
20:
<Date>2012-06-04</Date>
21:
</Bound>
22:
<Bound>
23:
<Origin iata='BCN'/>
24:
<Destination iata='CPH'/>
25:
<Date>2012-06-11</Date>
26:
<TimeOfDay>afternoon</TimeOfDay>
27:
</Bound>
28:
</HotelSearch>
29:
</Search>
30:
</Request>
31:
</SOAP-ENV:Body>
32:
</SOAP-ENV:Envelope>");
33:
34:
$result=$client->call($msg, $endpoint);
35:
print_r($result);
36:
37:
?>