I'm curremtly working on a project "Flight search" with SOAP and PHP. I'm new to this SOAP Technology.
I've to send the XML over POST Request and get the response:
<Request>
<Origin>BOM</Origin>
<Destination>DEL</Destination>
<DepartDate>2013-05-20</DepartDate>
<ReturnDate>2013-05-21</ReturnDate>
<AdultPax>1</AdultPax>
<ChildPax>0</ChildPax>
<InfantPax>0</InfantPax>
<Currency>INR</Currency>
<Clientid>*********</Clientid>
<Clientpassword>**************************</Clientpassword>
<Clienttype>ArzooFWS1.1</Clienttype>
<Preferredclass>E</Preferredclass>
<mode>ONE</mode>
<PreferredAirline>AI</PreferredAirline>
</Request>
to the URL:
http://xx.xxx.xx.xxx/ArzooWS/services/DOMFlightAvailability?wsdl
Can any one please help ? I'm struggling with this. Thanks in advance.
EDIT: I'm trying the following but its getting error:
$dom_document = simplexml_load_file("availability.xml");
try{
$soap_client =
new soapclient("http://xx.xxx.xx.xxx/ArzooWS/services/DOMFlightAvailability?wsdl");
$availability = $soap_client->getAvailability($dom_document);
echo $availability->getAvailabilityResponse;
}catch(SoapFault $exception){
echo $exception->getMessage();
}
The error i'm getting:
Notice: Trying to get property of non-object in
C:\xampp\htdocs\Flight\availability.php on line 9