473,396 Members | 1,827 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

php airline api soap problems

hi,

I am using UniserverZ, laravel framework with mysqldatabase.

i am doing travel project using domestic and International api. i use controller// flightcontroller.php

i.e
for domestic airline i use function as

Expand|Select|Wrap|Line Numbers
  1.  public function getFlightAvailability() 
  2.     {
  3.         $rules = array(
  4.             'sectorFrom'   => 'required',
  5.             'sectorTo' => 'required',
  6.             'trip_type' => 'required',
  7.             'flight_date' => 'required',
  8.             'nationality' => 'required'
  9.         );
  10.  
  11.         $sectorFrom     = Input::get('sectorFrom');
  12.         $sectorTo         = Input::get('sectorTo');
  13.         $flight_date     = Input::get('flight_date');
  14.         $trip_type         = Input::get('trip_type');
  15.         $adults         = Input::get('adults');
  16.         $children       = Input::get('children');
  17.  
  18.         // Create a new validator instance from our validation rules
  19.         $validator = Validator::make(Input::all(), $rules);
  20.  
  21.             // If validation fails, we'll exit the operation now.
  22.             if ($validator->fails())
  23.             {
  24.                 // Ooops.. something went wrong
  25.                 return Redirect::back()->withInput()->withErrors($validator);
  26.             }
  27.  
  28.             ini_set('soap.wsdl_cache_enabled',0);
  29.             ini_set('soap.wsdl_cache_ttl',0);
  30.  
  31.             // Userid : BLKEYE PASSWORD : PASSWORD AGENCYID :PLZ004
  32.  
  33.             // Userid : BLKEYE PASSWORD : BLEUS92219 AGENCYID :PLZ003
  34.  
  35.             //Test http://116.66.198.19:800/usBookingService/UnitedSolutions?wsdl
  36.  
  37.             //live http://116.90.239.74/us/UnitedSolutions?wsdl
  38.  
  39.         $united_solutions = ServiceProviderSetting::find(2);
  40.  
  41.         if(!empty($united_solutions->search) and $united_solutions->search == 1 ) 
  42.         {
  43.             try 
  44.             {
  45.                     $client = @new SoapClient("http://116.66.198.19:800/usBookingService/UnitedSolutions?wsdl", array(
  46.                                         "trace"=>1,
  47.                                         "location" =>"http://116.66.198.19:800/usBookingService/UnitedSolutions",
  48.                                         "uri" =>"http://booking.us.org/"));
  49.  
  50.                     $addRequest = new stdClass();
  51.                     $addRequest->strUserId      = "BLKEYE"; 
  52.                     $addRequest->strPassword    = "PASSWORD";
  53.                     $addRequest->strAgencyId    = "PLZ004";
  54.                     $addRequest->strSectorFrom  = $sectorFrom;
  55.                     $addRequest->strSectorTo    = $sectorTo;
  56.                     $addRequest->strFlightDate  = $flight_date;
  57.                     $addRequest->strTripType    = $trip_type;
  58.                     $addRequest->strReturnDate  = Input::get('return_date');
  59.                     $addRequest->strNationality = Input::get('nationality');
  60.                     $addRequest->intAdult       = Input::get('adults');
  61.                     $addRequest->intChild       = Input::get('children');
  62.  
  63.  
  64.                     $raw_flightavailability = $client->FlightAvailability($addRequest);
  65.  
  66.  
  67.                     $flightavailability = new SimpleXMLElement($raw_flightavailability->return);
  68.             }
  69.             catch(SoapFault $exception)
  70.             {
  71.             $error = "Oops, we have some issue :<br/> Service temporarily unavailable. Please check back later.";
  72.             //$error = ($exception->getMessage());
  73.  
  74.             return View::make("frontend.flightavail", compact('error'));
  75.             }
  76.         }
  77.  
  78.         else 
  79.         {
  80.  
  81.             $error = "Domestic Search Unavailable at the moment.";
  82.  
  83.             return View::make("frontend.flightavail", compact('error'));
  84.         }
  85.  
  86.  
  87.         return var_dump($raw_flightavailability);
  88.  
  89.         $test = Input::get('backend');
  90.  
  91.         if(!empty($test)) {
  92.             $slug = 'backend.flight_search';
  93.         }
  94.         else {
  95.             $slug = 'frontend';
  96.         }
  97.  
  98.         // Redirect to the new blog post page
  99.         return View::make($slug.'.flightavail', compact('flightavailability','sectorFrom', 'sectorTo', 'flight_date', 'trip_type', 'adults', 'children'));
  100.     }

/**************************************************/



it send only message as


object(stdclass()432)....Invalid Credentials or Invalid Request Format in unsing api.



plz any boldy can help to solve
Aug 17 '14 #1
0 1136

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Stephen Chell | last post by:
Hi all, I'm having problems importing an XML Signature element into a SOAP envelope. I can create the signature without problem, but when I import the signature element into the SOAP header,...
0
by: Michiel | last post by:
Hello, I am not sure this is the right place to ask. I tried the ZSI mailing list, but got no response there. My goal is to write some web services with ZSI to be used by a client written in...
1
by: Eirik Brattbakk | last post by:
Hi I have some problems accessing a soap service made in c# using an ATL/MFC client over SSL. I have tried both CSoapMSXMLInetClient and CSoapWininetClient as template arguments with my stub...
0
by: Jonathan | last post by:
Hi there, I am using a LOTUS/DOMINO Web Service in my ASP.Net application and I am having quite a lot of problems. I have managed to solve most of them but this one it really is giving me terrible...
0
by: Moshe Kravchik | last post by:
Hi! I have a following problem. I have a web service (written in ATL Server). It has 2 function, lets name them getData and setData. The getData returns a byte array, setData receives a byte...
4
by: Jonathan [sbrodolo] | last post by:
Hi there, I am using a LOTUS/DOMINO Web Service in my ASP.Net application and I am having quite a lot of problems. I have managed to solve most of them but this one it really is giving me terrible...
0
by: ben | last post by:
OK so there are a few things going on. I succesfully created a SOAP webreference in VS IDE which when built works fine under small amounts of load, however under heavy amounts of load we start to...
9
by: Jaroslaw Zabiello | last post by:
I try to connect to web services (written in C#/.NET) with latest ZSI 2.0rc3 library. It just does not work. from ZSI.ServiceProxy import ServiceProxy wsdl =...
2
by: furrypop | last post by:
Hi, I'm trying to get the Perl SOAP::Lite examples to work on a Windows PC, running Apache 2.2.4. Apache is definitely serving CGI scripts, as I've tested a dummy Hello World thing. I'm also...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.