If you want to integrate Arzoo Hotel Search Api for your website using soap my blog post will help you to do in just 1 min. I am attaching sample code here.

require_once (“nusoap.php”);
$location_URL = “YOUR HOTEL SEARCH URL “;
$action_URL =”http://com.arzoo.hotel.avail”;
$Request = “<arzHotelAvailReq>
<clientInfo>
<username>USERNAME</username>
<userType>ArzooHWS1.1</userType>
<userID>USERID</userID>
<password>PASSWORD</password>
<partnerID>PARTNERID</partnerID>
</clientInfo>
<requestSegment>
<currency>INR</currency>
<hotelSearchCriteria>
<area></area>
<attraction></attraction>
<hotelCityName>KOLKATA</hotelCityName>
<hotelName></hotelName>
<hotelPackage>Y</hotelPackage>
<rating></rating>
<sortingPreference>3</sortingPreference>
</hotelSearchCriteria>
<residentOfIndia>true</residentOfIndia>
<roomStayCandidate>
<guestDetails>
<adults>2</adults>
</guestDetails>
</roomStayCandidate>
<searchType>search</searchType>
<stayDateRange>
<end>18/03/2014</end>
<start>17/03/2014</start>
</stayDateRange>
</requestSegment>
</arzHotelAvailReq>”;
$clientinfo = array(‘soap_version’ => SOAP_1_1,
‘location’ => $location_URL,
‘uri’ => $action_URL,
‘style’ => SOAP_RPC,
‘use’ => SOAP_ENCODED,
‘trace’ => 1,
);
$client = new SoapClient(‘YOUR HOTEL SEARCH URL?wsdl’,$clientinfo);
$result = $client->__call(‘getHotelAvailSearch’,array($Request));
$response= htmlentities($result);

You may need to whitelist your ip calling to there support team to get the result.

6 thoughts on “Arzoo Php Soap Api integration for Hotel search”

  1. when i implement this code i get fault,
    Fatal error: Uncaught SoapFault exception: [VersionMismatch] Wrong Version in C:\wamp\www\xml\krish.php:54 Stack trace: #0 C:\wamp\www\xml\krish.php(54): SoapClient->__call(‘getHotelAvailSe…’, Array) #1 {main} thrown in C:\wamp\www\xml\krish.php on line 54

  2. <?php

    $request="

    DilipEnterprisesXML
    ArzooHWS1.1
    77743674
    *430D9DB3AA5BC5C5C08BFAFA900539D5E5CE6BEA
    100200

    INR
    search
    true

    17/10/2015
    18/10/2015

    2

    KOLKATA

    1

    Y

    “;

    $location_URL = “http://59.162.33.102/HotelXML_V1.2/services/HotelAvailSearch?wsdl”;
    $action_URL =”http://com.arzoo.hotel.avail”;
    $client = new SoapClient(‘http://59.162.33.102/HotelXML_V1.2/services/HotelAvailSearch?wsdl’, array(
    ‘soap_version’ => SOAP_1_1,
    ‘location’ => $location_URL,
    ‘uri’ => $action_URL,
    ‘style’ => SOAP_RPC,
    ‘use’ => SOAP_ENCODED,
    ‘trace’ => 1,
    ));
    try
    {
    $result = $client->__call(‘getHotelAvailSearch’,array($request));
    $response= htmlentities($result);
    //$response= $result;

    }
    catch(Exception $e){
    echo “Exception Error!”;
    echo $e->getMessage();
    exit;
    }

    ?>

    I’m getting Wrong Version While Sending a SOAP request. help me

Leave a Reply

Your email address will not be published. Required fields are marked *