Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8273415
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T07:29:07+00:00 2026-06-08T07:29:07+00:00

I am using an api for getting the data but when i use the

  • 0

I am using an api for getting the data but when i use the json i get the data with the following code

string apiKey = Connection.AppSettings("APIKey");
        string fullURL = "http://api.hotelspro.com/4.1_test/hotel/b2bHotelJSON.php?method=getAvailableHotel&apiKey=" + apiKey + "&destinationId=LD6J&checkIn=2012-07-20&checkOut=2012-07-24&currency=EUR&clientNationality=UK&onRequest=false&rooms[0][0][paxType]=Adult&rooms[0][1][paxType]=Adult&rooms[0][2][paxType]=Child&rooms[0][2][age]=6&rooms[1][0][paxType]=Adult&rooms[1][1][paxType]=Adult&rooms[1][2][paxType]=Child&rooms[1][2][age]=8&filters[0][filterType]=hotelStar&filters[0][filterValue]=3&filters[1][filterType]=resultLimit&filters[1][filterValue]=10";

        string text;
        try
        {
            HttpWebRequest request = WebRequest.Create(fullURL) as HttpWebRequest;
            request.Method = "Get";
            using (HttpWebResponse response = request.GetResponse() as HttpWebResponse)
            {
                if (response.StatusCode != HttpStatusCode.OK)
                    throw new Exception(String.Format(
                    "Server error (HTTP {0}: {1}).",
                    response.StatusCode,
                    response.StatusDescription));
                using (var sr = new StreamReader(response.GetResponseStream()))
                {
                    text = sr.ReadToEnd();
                }
                 Response.Write(text);



            }
        }
        catch (Exception ex)
        {
            Response.Write(ex.Message);
        }

But when i am using the same thing below this code with soap then its showing zero records.

here is the code for soap wsdl .

b2bHotelSOAPService objsoap = new b2bHotelSOAPService();
        objsoap.Timeout = 20000;
        objsoap.Url = "http://api.hotelspro.com/4.1_test/hotel/b2bHotelSOAP.php";

        string destinationId = "CIEC";
        DateTime checkIn = new DateTime(2012, 7, 20);
        DateTime checkOut = new DateTime(2012, 7, 24);
        string strCurrencyCode = "EUR";



        pax[][] rooms = new pax[3][];
        rooms[0] = new pax[3];
        rooms[0][0] = new pax();
        rooms[0][1] = new pax();
        rooms[0][2] = new pax();

        rooms[1] = new pax[3];
        rooms[1][0] = new pax();
        rooms[1][1] = new pax();
        rooms[1][2] = new pax();


        rooms[0][0].paxType = "Adult";
        rooms[0][1].paxType = "Adult";
        rooms[0][2].paxType = "Child";
        rooms[0][2].age = "6";

        rooms[1][0].paxType = "Adult";
        rooms[1][1].paxType = "Adult";
        rooms[1][2].paxType = "Child";
        rooms[1][2].age = "8";



        filter[] f = new filter[2];
        f[0] = new filter();
        f[0].filterType = "hotelStar";
        f[0].filterValue = "3";

        f[1] = new filter();
        f[1].filterType = "resultLimit";
        f[1].filterValue = "20";






        getAvailableHotelResponse getres = new getAvailableHotelResponse();

        getres = objsoap.getAvailableHotel(apiKey, destinationId, checkIn, checkOut, strCurrencyCode, "UK", false, rooms, f);

here gets show zero records.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T07:29:09+00:00Added an answer on June 8, 2026 at 7:29 am

    Thanks to hotelsPro.com support team . Finally i got answer from them that i am making three rooms in this soap request but sending data only for two .

    so i need to change this line

    pax[][] rooms = new pax[3][];
    

    into

    pax[][] rooms = new pax[2][];
    

    and now i am getting response from soap also. once again to thanks hotelsPro.com support team.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am retriveing data from a soap api using php. but unable to get
I have tried to upload image using FileTransfer.upload in phonegap api.But I am getting
Trying to learn how to use JSON and parse the json data.i am using
I'm just starting to use the Twitter API to retrieve data using jQuery. I've
I used Json to get data off a site build in Wordpress (using the
via server API's i'm getting contact information using member of structure: char displayName[USERNAME_MAX_SIZE]; One
I'm using a 3rd party api to request balances. I'm getting numerous errors on
I want to update Paypal Order status and add tracking number using API. but
I'm doing pretty simple thing here: getting Facebook news feed using their graph API.
I'm trying to use the Yelp API to get local restaurants depending on the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.