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

  • SEARCH
  • Home
  • 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 8598085
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T01:04:26+00:00 2026-06-12T01:04:26+00:00

I am trying to send a soap request to a remote server and getting

  • 0

I am trying to send a soap request to a remote server and getting the response back. But the issues I am facing with is in my request one parameter is in my request i.e. I created an array of parameters needed for my request and only one parameter I am not able to see,

// The Sample Request:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<hot:HotelSearchAvailabilityReq    xmlns:hot="http://www.xxx.com/schema/hotel_v17" xmlns:com="http://www.xxx.com/schema/common_v10" TargetBranch="WAB HERE">
<com:BillingPointOfSaleInfo OriginApplication="UDT"/>
<hot:HotelLocation Location="TPA" LocationType="City">
<com:VendorLocation ProviderCode="" VendorCode="" VendorLocationID="" Key="1"/>
<com:VendorLocation ProviderCode="" VendorCode="" VendorLocationID="" Key="2"/>
<com:VendorLocation ProviderCode="" VendorCode="" VendorLocationID="" Key="3"/>
<com:VendorLocation ProviderCode="" VendorCode="" VendorLocationID="" Key="2"/>
</hot:HotelLocation>
<hot:HotelSearchModifiers NumberOfAdults="2" NumberOfRooms="1">
<com:CorporateDiscountID NegotiatedRateCode="true">CCC</com:CorporateDiscountID>
</hot:HotelSearchModifiers>
<hot:HotelStay>
<hot:CheckinDate>2012-06-01</hot:CheckinDate>
<hot:CheckoutDate>2012-06-02</hot:CheckoutDate>
</hot:HotelStay>
</hot:HotelSearchAvailabilityReq>
</soapenv:Body>
</soapenv:Envelope>

// My request is:

<?xml version="1.0" encoding="UTF-8"?> 
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://www.xxx.com/schema/common_v10" xmlns:ns2="http://www.xxx.com/schema/hotel_v19">
<SOAP-ENV:Body>
    <ns2:HotelSearchAvailabilityReq>
        <ns1:BillingPointOfSaleInfo OriginApplication="UAPI"/>
        <ns2:HotelLocation Location="LON" LocationType="City"/>
        <ns2:HotelSearchModifiers NumberOfAdults="2" NumberOfRooms="1"/>
        <ns2:HotelStay>
            <ns2:CheckinDate>2012-11-06</ns2:CheckinDate>
            <ns2:CheckoutDate>2012-11-14</ns2:CheckoutDate>
        </ns2:HotelStay>
    </ns2:HotelSearchAvailabilityReq>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope> 

In my request to that of sample request, I am not able get the parameter “VendorLocation”.

//Php code:
ModuleFunction.php

class HotelResultsSoapClient extends SoapClient 
{
function __construct($wsdlLocation)
{
    $trac["trace"]=1;
    $trac["use"]=SOAP_LITERAL;
    $trac["style"]=SOAP_DOCUMENT;
    $trac["compression"]=SOAP_COMPRESSION_ACCEPT | SOAP_COMPRESSION_GZIP | 5;
    //$trac["compression"]=SOAP_COMPRESSION_ACCEPT ;
    $trac["type_ns"]="";
    $trac["login"]=SOAP_CLIENT_USERNAME;
    $trac["password"]=SOAP_CLIENT_PASSWORD;
    $trac["location"]="https://xxx.com/B2BGateway/connect/uAPI/HotelService";
    $trac["version"]="SOAP_1_1";
    $trac["action"]="http://localhost:8080/kestrel/HotelService";

    parent::__construct($wsdlLocation,$trac);
}

function __doRequest($request, $location, $action, $version) 
{

    $namespace1="http://www.travelport.com/schema/hotel_v19_0";
    $namespace2="http://www.travelport.com/schema/common_v17_0";

    if(empty($_SESSION['hotelSearch']['nextResultReference']) || $_SESSION['hotelSearch']['nextResultReference'] == "notSet")
    {
    //used for sending a normal hotel request  --- do not delete just comment/ uncomment
        $request=str_replace("<ns2:HotelSearchAvailabilityReq","<ns2:HotelSearchAvailabilityReq TargetBranch=".'"'."a00000".'"'." "."xmlns:ns2=".'"'.$namespace1.'"'." "."xmlns:ns1=".'"'.$namespace2.'"',$request);

    }
    else
    {
        //used for sending next result hotel request --- do not delete just comment/ uncomment
        $request=str_replace("<ns2:HotelSearchAvailabilityReq","<ns2:HotelSearchAvailabilityReq TargetBranch=".'"'."a00000".'"'." "."xmlns:ns2=".'"'.$namespace1.'"'." "."xmlns:ns1=".'"'.$namespace2.'"',$request);
        $request=str_replace("<ns1:NextResultReference","<ns1:NextResultReference"." ".'ProviderCode="1G"',$request);   
    }



    return parent::__doRequest($request, $location, $action, $version);
}//function

function __getLastRequestHeaders()
{
    return parent::__getLastRequestHeaders();
}//function

function __getLastRequest()
{
    return parent::__getLastRequest();
}//function

  }//class

Results.php

require_once('ModuleFunctions.php');

$client = new HotelResultsSoapClient("WSDL Url");
$final = array();
$final['vc'] = {"oo","yz","hi","ii","xx"};
$final['vi'] = {"00000","12345","11111","99999","23456"};
$params = array();
// element = BillingPointOfsaleInfo ; attribute = OriginApplication.
$params["BillingPointOfSaleInfo"] = array();
$params["BillingPointOfSaleInfo"]["OriginApplication"] = "UAPI";
/* ----------------------------------------------------------------------- */
// element = HotelLocation ; attribute = Location, LocationType.
$params["HotelLocation"] = array();
$params["HotelLocation"]["Location"] = "{$destination}";
$params["HotelLocation"]["LocationType"] = "City";
/* ----------------------------------------------------------------------- */
// element = VendorLocation ; attribute = ProviderCode, VendorCode, VendorLocationID,  Key.
$params["VendorLocation"] = array();
for ($i = 0; $i < count($final['vc']); $i++) {
$params["VendorLocation"][$i] = array();
$params["VendorLocation"][$i]["ProviderCode"] = "1G";
$params["VendorLocation"][$i]["VendorCode"] = "{$final['vc'][$i]}";
$params["VendorLocation"][$i]["VendorLocationID"] = "{$final['vi'][$i]}";
}
//$params["VendorLocation"]["ProviderCode"] = "1G";
//$params["VendorLocation"]["VendorCode"] = "WV";
//$params["VendorLocation"]["VendorLocationID"] = "95625";
/* ----------------------------------------------------------------------- */
// element = HotelSearchModifiers ; attribute = NumberofAdults, NumberOfRooms.
$params["HotelSearchModifiers"] = array();
$params["HotelSearchModifiers"]["NumberOfAdults"] = "{$NumberOfAdults}";
$params["HotelSearchModifiers"]["NumberOfRooms"] = "{$NumberOfRooms}";
/* ------------------------------------------------------------------------- */
// element = CorporateDiscountID ; attribute = NegotiatedRateCode.
$params["CorporateDiscountID"] = array();
$params["CorporateDiscountID"]["NegotiatedRateCode"] = "true";
/* ------------------------------------------------------------------------- */
// element = HotelStay ; attribute = CheckinDate, CheckoutDate.
$params["HotelStay"] = array();
$params["HotelStay"]["CheckinDate"] = "{$checkInDate}";
$params["HotelStay"]["CheckoutDate"] = "{$checkOutDate}";

$response = $client->service($params);

echo "<hr>" . "Request" . "<hr/>" . "<br/>";
echo "\n" . "Request:" . htmlentities($client->__getLastRequest()) . "\n";
echo "<br/>";

My parameter array consists of it but its shown in my request

// Parameter array:

Array
(
[BillingPointOfSaleInfo] => Array
    (
        [OriginApplication] => UAPI
    )

[HotelLocation] => Array
    (
        [Location] => LON
        [LocationType] => City
    )

[VendorLocation] => Array
    (
        [0] => Array
            (
                [ProviderCode] => 1G
                [VendorCode] => oo
                [VendorLocationID] => 00000 
            )

        [1] => Array
            (
                [ProviderCode] => 1G
                [VendorCode] => yz
                [VendorLocationID] => 12345 
            )

        [2] => Array
            (
                [ProviderCode] => 1G
                [VendorCode] => hi
                [VendorLocationID] => 11111 
            )

        [3] => Array
            (
                [ProviderCode] => 1G
                [VendorCode] => ii
                [VendorLocationID] => 99999 
            )

        [4] => Array
            (
                [ProviderCode] => 1G
                [VendorCode] => xx
                [VendorLocationID] => 23456 
            )

    )

[HotelSearchModifiers] => Array
    (
        [NumberOfAdults] => 2
        [NumberOfRooms] => 1
    )

[CorporateDiscountID] => Array
    (
        [NegotiatedRateCode] => true
    )

[HotelStay] => Array
    (
        [CheckinDate] => 2012-11-06
        [CheckoutDate] => 2012-11-14
    )

)

Can any one help me out where I am getting wrong please.
Note: If any more info req plz ask.

Kind Regards,

  • 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-12T01:04:27+00:00Added an answer on June 12, 2026 at 1:04 am

    need to just change the parameter array structure, As “vendorLocation” parameter is a part of “HotelLocation”. So I moved the Vendor location array as a part of hotel location array.

    // parameters array

    Array
    (
    [BillingPointOfSaleInfo] => Array
        (
            [OriginApplication] => UAPI
        )
    
    [HotelLocation] => Array
        (
            [VendorLocation] => Array
                (
                    [ProviderCode] => 1G
                    [VendorCode] => WV
                    [VendorLocationID] => 95625
                )
    
            [Location] => LON
            [LocationType] => City
        )
    
    [HotelSearchModifiers] => Array
        (
            [NumberOfAdults] => 2
            [NumberOfRooms] => 1
        )
    
    [CorporateDiscountID] => Array
        (
            [NegotiatedRateCode] => true
        )
    
    [HotelStay] => Array
        (
            [CheckinDate] => 2012-10-27
            [CheckoutDate] => 2012-10-30
        )
    
    ) 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to send-retrive message from server by SOAP... but soapConnection.call( soapMessage, endpoint )
I am trying to send a request to server with my soap request and
I'm trying to send a SOAP request using SOAPpy as the client. I've found
I am trying to send a soap request to an open webservice (webserviceX.NET currency
I'm tired of trying to send a request with SOAP. this is my xml
I am trying to send a SOAP request from a xml file and send
I'm trying to send a SOAP request to a 3rd party web service. I've
I'm trying to dynamically send a SOAP request to different webservices. Each webservice has
I'm trying to send a SOAP request via PHP with the following header: <soap:Header>
I am trying to send a soap message to an external system, this system

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.