473,549 Members | 2,615 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

php airline api soap problems

1 New Member
hi,

I am using UniserverZ, laravel framework with mysqldatabase.

i am doing travel project using domestic and International api. i use controller// flightcontrolle r.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)....Inval id Credentials or Invalid Request Format in unsing api.



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

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

Similar topics

0
2250
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, all of the elements in the entire SOAP envelope have a default namespace declaration of xmlns="" added to them. Also, all sub-elements of the...
0
1694
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 .NET. I'm using ZSI 1.2.7 (this was easy to install on my Debian system). I have no problem with functions with parameters and return values
1
3939
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 class. The service is returning with the error code: -2147467259. I have not succeeded to find any additional information about the error. The...
0
1228
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 headaches. Web Service send's me back an XML that I have managed to read with an enormous quantity of problems (it sends me back an XML file with...
0
6772
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 array. I have a client written in c#. getData works perfectly, setData fails with the exception "SOAP Invalid Request". I've looked at the...
4
2247
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 headaches. Web Service send's me back an XML that I have managed to read with an enormous quantity of problems (it sends me back an XML file with...
0
1360
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 see a performance issue on the J2EE (CPU utilisation max's out) the load testing tool can hit the web service directly using HTTP posts and for the...
9
2850
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 = 'http://192.168.0.103/NewWebServices/TemplateInsert.asmx?wsdl' print ServiceProxy(wsdl, tracefile=sys.stdout) ...
2
6746
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 definitely getting a hit when I use a browser to get to my hibye.cgi server (well, a blank page rather than a 404). However, when I run my hibye.pl...
0
7521
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7959
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7473
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7810
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6044
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5369
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5088
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3483
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
764
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.