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
/*************** *************** *************** *****/
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
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
Code:
public function getFlightAvailability()
{
$rules = array(
'sectorFrom' => 'required',
'sectorTo' => 'required',
'trip_type' => 'required',
'flight_date' => 'required',
'nationality' => 'required'
);
$sectorFrom = Input::get('sectorFrom');
$sectorTo = Input::get('sectorTo');
$flight_date = Input::get('flight_date');
$trip_type = Input::get('trip_type');
$adults = Input::get('adults');
$children = Input::get('children');
// Create a new validator instance from our validation rules
$validator = Validator::make(Input::all(), $rules);
// If validation fails, we'll exit the operation now.
if ($validator->fails())
{
// Ooops.. something went wrong
return Redirect::back()->withInput()->withErrors($validator);
}
ini_set('soap.wsdl_cache_enabled',0);
ini_set('soap.wsdl_cache_ttl',0);
// Userid : BLKEYE PASSWORD : PASSWORD AGENCYID :PLZ004
// Userid : BLKEYE PASSWORD : BLEUS92219 AGENCYID :PLZ003
//Test http://116.66.198.19:800/usBookingService/UnitedSolutions?wsdl
//live http://116.90.239.74/us/UnitedSolutions?wsdl
$united_solutions = ServiceProviderSetting::find(2);
if(!empty($united_solutions->search) and $united_solutions->search == 1 )
{
try
{
$client = @new SoapClient("http://116.66.198.19:800/usBookingService/UnitedSolutions?wsdl", array(
"trace"=>1,
"location" =>"http://116.66.198.19:800/usBookingService/UnitedSolutions",
"uri" =>"http://booking.us.org/"));
$addRequest = new stdClass();
$addRequest->strUserId = "BLKEYE";
$addRequest->strPassword = "PASSWORD";
$addRequest->strAgencyId = "PLZ004";
$addRequest->strSectorFrom = $sectorFrom;
$addRequest->strSectorTo = $sectorTo;
$addRequest->strFlightDate = $flight_date;
$addRequest->strTripType = $trip_type;
$addRequest->strReturnDate = Input::get('return_date');
$addRequest->strNationality = Input::get('nationality');
$addRequest->intAdult = Input::get('adults');
$addRequest->intChild = Input::get('children');
$raw_flightavailability = $client->FlightAvailability($addRequest);
$flightavailability = new SimpleXMLElement($raw_flightavailability->return);
}
catch(SoapFault $exception)
{
$error = "Oops, we have some issue :<br/> Service temporarily unavailable. Please check back later.";
//$error = ($exception->getMessage());
return View::make("frontend.flightavail", compact('error'));
}
}
else
{
$error = "Domestic Search Unavailable at the moment.";
return View::make("frontend.flightavail", compact('error'));
}
return var_dump($raw_flightavailability);
$test = Input::get('backend');
if(!empty($test)) {
$slug = 'backend.flight_search';
}
else {
$slug = 'frontend';
}
// Redirect to the new blog post page
return View::make($slug.'.flightavail', compact('flightavailability','sectorFrom', 'sectorTo', 'flight_date', 'trip_type', 'adults', 'children'));
}
/*************** *************** *************** *****/
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