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 6111255
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T14:36:35+00:00 2026-05-23T14:36:35+00:00

//PHP CODE <?php $xmlData='<OTA_HotelDestinationsRQ Version=1.0> <POS> <Source> <UniqueId Id=user:password /> </Source> </POS> <DestinationInformation LanguageCode=EN

  • 0
//PHP CODE
<?php
$xmlData='<OTA_HotelDestinationsRQ Version="1.0">
           <POS>
             <Source>
                  <UniqueId Id="user:password" />
             </Source>
           </POS>
           <DestinationInformation LanguageCode="EN" />
         </OTA_HotelDestinationsRQ>';

$wsdl="http://acceptance.travelstreet.com/hotelsv3/components/Hotels_DestinationsWS.cfc?wsdl";
$client=new SoapClient($wsdl,array('trace' => 1));
try
{

     $res=$client->__call("OTA_HotelDestinationsRQ",array($xmlData));
}
catch (SoapFault $Exception)
{
     echo 'SoapFault Exception';
}
echo $res;
?>

It is showing Internal Server error

Later on i have changed above xml into array using xml2array class and i kept the result in one variable like

$iArray=xml2array($xmlData);
Using this i have coded like:

<?php
$xmlData='<OTA_HotelDestinationsRQ Version="1.0">
           <POS>
             <Source>
                  <UniqueId Id="user:password" />
             </Source>
           </POS>
           <DestinationInformation LanguageCode="EN" />
         </OTA_HotelDestinationsRQ>';

$wsdl="http://acceptance.travelstreet.com/hotelsv3/components/Hotels_DestinationsWS.cfc?wsdl";
$client=new SoapClient($wsdl,array('trace' => 1));
try
{

     $res=$client->__call("OTA_HotelDestinationsRQ",$iArray); 
     // (or) also check with bellow statement
     $res=$client->OTA_HotelDestinationsRQ($iArray);
}
catch (SoapFault $Exception)
{
     echo 'SoapFault Exception';
}
echo $res;
?>

It is showing Invalid Xml error

  • 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-05-23T14:36:35+00:00Added an answer on May 23, 2026 at 2:36 pm

    Hi I was getting same kind of error but then @Pete here , helped me with this code snippet , please try to use this code snippet may be it can work for you as well..

    <?php
    $xmlData='<OTA_HotelDestinationsRQ Version="1.0">
               <POS>
                 <Source>
                      <UniqueId Id="user:password" />
                 </Source>
               </POS>
               <DestinationInformation LanguageCode="EN" />
             </OTA_HotelDestinationsRQ>';
    
    
    $client = new SOAPClient(
        'http://acceptance.travelstreet.com/hotelsv3/components/Hotels_DestinationsWS.cfc?wsdl',
        array(
            'location' => 'http://acceptance.travelstreet.com/hotelsv3/components/Hotels_DestinationsWS.cfc',
            'trace' => 1,
            'style' => SOAP_RPC,
            'use' => SOAP_ENCODED,
        )
    );
    
    $result = array();
    
    $params = array("YourXMLParameterName" => $request);
    
    
    try
    {
         $result = $client->__soapCall('getAllDepartments', array("parameters"=>$params));
    }
    catch (SoapFault $Exception)
    {
         echo "SOAP Fault: ".$e->getMessage()."<br />\n";
    }
    echo $res;
    ?>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I wrote a PHP code like this $site=http://www.google.com; $content = file_get_content($site); echo $content; But
So in my PHP code, I do timezone selection for the user, where I
This PHP code... 207 if (getenv(HTTP_X_FORWARDED_FOR)) { 208 $ip = getenv('HTTP_X_FORWARD_FOR'); 209 $host =
The following PHP code snippet uses GD to resize a browser-uploaded PNG to 128x128.
I am running following PHP code to interact with a MS Access database. $odbc_con
I am using following PHP code to connect to MS Access database: $odb_conn =
Say i have this PHP code: $FooBar = a string; i then need a
I'm refactoring some PHP code and discovered that certain nested combinations of if ()
I am writing PHP code where I want to pass the session id myself
Optimization of PHP code via runtime benchmarking is straight forward. Keep track of $start

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.