I hope I can help if possible, I can have a backend in Laravel and I need to consume some SOAP web services, for this I am using the native SoapClient() class. I'm getting this error:
SOAP ERROR: Analysis scheme: you cannot import the scheme from http://[redacted]?xsd=xsd0
I cannot display the URL because it is a private but external server of the company. Here is my code:
public function getCotizacion(){
// phpinfo();
$Empresa = $this->set_Empresa();
$Sistema = $this->set_Sistema();
$Direcciones = $this->set_Direcciones();
$namespace = "http://[redacted]";
$IdConfiguracion = $this->set_IdConfiguracion();
$Solicitante = $this->set_Solicitante();
$FechaRegistro = date("c");
$WCFBroker = $this->set_WCFBroker();
$options = array(
"trace" => 1,
"encoding" => "UTF-8",
"verifypeer" => false,
"verifyhost" => false,
"proxy_port" => 7801,
"soap_version" => SOAP_1_2,
"trace" => 1,
"exceptions" => true,
"cache_wsdl"=>WSDL_CACHE_NONE
);
// SOAP client
$soapClient = new \SoapClient($WCFBroker, $options);
$auth = array(
'Empresa' => (string) $Empresa,
'Sistema' => (string) $Sistema,
'Direcciones' => (string) $Direcciones
);
$header = new \SoapHeader($namespace, 'SeguridadHeaderElement', $auth, false);
$soapClient->__setSoapHeaders($header);
// nodos de arreglo body
$request0 = new stdClass();
$request0->FechaHora = $FechaRegistro;
$request1 = new stdClass();
$request1->ConsecutivoConfiguracion = $IdConfiguracion;
$request1->Solicitante = $Solicitante;
$request1->Parametros = new \SoapVar($Trama, XSD_ANYXML);
$parameters = new stdClass();
$parameters->InfoSolicitud = array('InfoTransaccion' => $request0, 'Cotizacion' => $request1);
$Info = array();
try {
$Info['Info'] = $soapClient->CotizarPoliza($parameters);
} catch (SoapFault $fault) {
$Info['Info'] = $fault;
}
$Info['request']['headers'] = $soapClient->__getLastRequestHeaders();
$Info['request']['body'] = $soapClient->__getLastRequest();
$Info['response']['headers'] = $soapClient->__getLastResponseHeaders();
$Info['response']['body'] = $soapClient->__getLastResponse();
return $Info;
}
The error paints this line as the one that is failing:
$soapClient = new \SoapClient($WCFBroker, $options);
What's going wrong?
Related
For example: I can copy only one file but I need opportunity to copy a few files because I have problems with the speed of application.
$fileMimeType = $this->service->files->get($googleFileId, array('fields' => 'mimeType'));
$metadata = new \Google_Service_Drive_DriveFile(
array(
'name' => uniqid(),
'uploadType' => 'multipart',
'mimeType' => isset($fileMimeType->mimeType) ? $fileMimeType->mimeType : false
)
);
$file = $this->service->files->copy($googleFileId, $metadata, array('fields' => 'id'));
Here is a sample from the docs of the google-api-client :
<?php
$client = new Google_Client();
$client->setApplicationName("Client_Library_Examples");
// Warn if the API key isn't set.
if (!$apiKey = getApiKey()) {
echo missingApiKeyWarning();
return;
}
$client->setDeveloperKey($apiKey);
$service = new Google_Service_Books($client);
$client->setUseBatch(true);
$batch = $service->createBatch();
$optParams = array('filter' => 'free-ebooks');
$req1 = $service->volumes->listVolumes('Henry David Thoreau', $optParams);
$batch->add($req1, "thoreau");
$req2 = $service->volumes->listVolumes('George Bernard Shaw', $optParams);
$batch->add($req2, "shaw");
$results = $batch->execute();
In your case, i think it will look like this :
P.S : Try enabling the batch processing when creating your client as show above ($client->setUseBatch(true);)
$batch = $this->service->createBatch();
$fileMimeType = $this->service->files->get($googleFileId, array('fields' => 'mimeType'));
$metadata = new \Google_Service_Drive_DriveFile(
array(
'name' => uniqid(),
'uploadType' => 'multipart',
'mimeType' => isset($fileMimeType->mimeType) ? $fileMimeType->mimeType : false
)
);
$fileCopy = $this->service->files->copy($googleFileId, $metadata, array('fields' => 'id'));
$batch->add($fileCopy, "copy");
$results = $batch->execute();
More details here
Abdelkarim EL AMEL: Thanks, you forward me to one of solving :)
We can't use this code:
$fileCopy = $this->service->files->copy($googleFileId, $metadata, array('fields' => 'id'));
$batch->add($fileCopy, "copy");
Because method $batch->add accept Psr\Http\Message\RequestInterface, $this->service->files->copy returned Google_Service_Drive_DriveFile
But we can create GuzzleHttp\Psr7\Request as same creating method copy from $this->service->files->copy.
This code solved my problem:
private function copyFileRequest($googleFileId)
{
// build the service uri
$url = $this->service->files->createRequestUri('files/{fileId}/copy', [
'fileId' => [
'location' => 'path',
'type' => 'string',
'value' => $googleFileId,
],
]);
$request = new Request('POST', $url, ['content-type' => 'application/json']);
return $request;
}
public function batchCopy()
{
$googleFileIdFirst = 'First file';
$googleFileIdSecond = 'Second file';
$batch = $this->service->createBatch();
$batch->add($this->copyFileRequest($googleFileIdFirst));
$batch->add($this->copyFileRequest($googleFileIdSecond));
$results = $batch->execute();
/** #var Response $result */
foreach ($results as $result) {
/** #var Stream $body */
$body = (string)$result->getBody(); // Returned json body with copy file
}
}
Other way, we can set defer as true for Google_Client
$client = new \Google_Client();
$client->useApplicationDefaultCredentials();
$client->setScopes([\Google_Service_Drive::DRIVE]);
// Calls should returned request not be executed
$client->setDefer(true)
$service = new \Google_Service_Drive($this->client);
And all methods from service return Psr\Http\Message\RequestInterface
$batch = $service->createBatch();
$googleServiceDriveFile = new \Google_Service_Drive_DriveFile(['name' => uniqid()]);
$request = $service->files->copy($googleFileId, $googleServiceDriveFile, ['fields' => 'id']);
$batch->add($request);
$results = $batch->execute();
I'm new on Soap\NuSoap
I can connect to server site but from server send data back to client i can not get data in array to show client site. I have to test to get data and send data back to other database. I have to get in array.
it's show error
XML error parsing SOAP payload on line 2: Invalid document end
I can't fix it by myself. please help.
This is my client.php
include("lib/nusoap.php");
$client = new nusoap_client("http://192.168.20.3/soap_server/webservice.php?wsdl");
$client->soap_defencoding = 'utf-8';
$client->encode_utf8 = false;
$client->decode_utf8 = false;
$params = array(
'strName' => $_POST["strName"],
);
$result = $client->call("resultCustomer",$params);
$err = $client->getError();
if ($err) {
echo '<h2>Constructor error</h2><pre>' . $err . '</pre>';
echo '<h2>Debug</h2><pre>' . htmlspecialchars($client->getDebug(), ENT_QUOTES) . '</pre>';
exit();
}
print_r($result);
And this is server.php
require_once("lib/nusoap.php");
//Define our namespace
$namespace = "http://localhost/soap_server/webservice.php";
//Create a new soap server
$server = new soap_server();
//Configure our WSDL
$server->configureWSDL("getCustomer");
$server->wsdl->schemaTargetNamespace = $namespace;
$server->soap_defencoding = 'utf-8';
$server->encode_utf8 = false;
$server->decode_utf8 = false;
//Register our method and argument parameters
$varname = array(
'strName' => "xsd:string"
);
//Add ComplexType
$server->wsdl->addComplexType(
'ArrayOfString',
'complexType',
'array',
'',
'',
array(
'id_user' => array('name' => 'id_user', 'type' => 'xsd:string'),
'firstname' => array('name' => 'firstname', 'type' => 'xsd:string'),
'username' => array('name' => 'username', 'type' => 'xsd:string'),
'lastname' => array('name' => 'lastname', 'type' => 'xsd:string')
)
);
//Add ComplexType
$server->wsdl->addComplexType(
'ArrayOfString',
'complexType',
'array',
'',
'SOAP-ENC:Array',
array(),
array(
array('ref'=>'SOAP-ENC:arrayType','wsdl:arrayType'=>'tns:DataList[]')
),
'tns:DataList'
);
// Register service and method
$server->register('resultCustomer',$varname, array('return' => 'tns:ArrayOfString'));
function resultCustomer($strName)
{
$objConnect = mysql_connect("localhost","root","") or die(mysql_error());
$objDB = mysql_select_db("qpt-test");
$strSQL = "SELECT * FROM qpt_user where firstname like '%".$strName."%'";
$objQuery = mysql_query($strSQL) or die (mysql_error());
$intNumField = mysql_num_fields($objQuery);
$resultArray = array();
while($obResult = mysql_fetch_array($objQuery))
{
$arrCol = array();
for($i=0;$i<$intNumField;$i++)
{
$arrCol[mysql_field_name($objQuery,$i)] = $obResult[$i];
}
array_push($resultArray,$arrCol);
}
return $resultArray;
}
$POST_DATA = isset($GLOBALS['HTTP_RAW_POST_DATA']) ? $GLOBALS['HTTP_RAW_POST_DATA'] : '';
// pass our posted data (or nothing) to the soap service
$server->service($POST_DATA);
exit();
I cannot connect to webservice and send/receive data
Error
HTTP,Cannot process the message because the content type 'text/xml;
charset=utf-8' was not the expected type 'application/soap+xml;
charset=utf-8'.
Code
$parameters = [
'UserName' => 12324,
'Password' => 432123,
'Bill_Id' => 153585611140,
'Payment_Id' => 8560103,
];
$url="https://bill.samanepay.com/CheckBill/BillStateService.svc?wsdl";
$method = "VerifyBillPaymentWithAddData";
$client = new SoapClient($url);
try{
$info = $client->__call($method, array($parameters));
}catch (SoapFault $fault){
die($fault->faultcode.','.$fault->faultstring);
}
Notice : not work Soap version 1,1 and other resolve sample for this error in stackoverflow.
You could try
$url = "https://bill.samanepay.com/CheckBill/BillStateService.svc?wsdl";
try {
$client = new SoapClient($url, [
"soap_version" => SOAP_1_2, // SOAP_1_1
'cache_wsdl' => WSDL_CACHE_NONE, // WSDL_CACHE_MEMORY
'trace' => 1,
'exception' => 1,
'keep_alive' => false,
'connection_timeout' => 500000
]);
print_r($client->__getFunctions());
} catch (SOAPFault $f) {
error_log('ERROR => '.$f);
}
to verify that your method name is correct.
There you can see the method
VerifyBillPaymentWithAddDataResponse VerifyBillPaymentWithAddData(VerifyBillPaymentWithAddData $parameters)
Next is to check the Type VerifyBillPaymentWithAddData and if the parameter can be an array.
Also you could test to call the method via
$client->VerifyBillPaymentWithAddData([
'UserName' => 12324,
'Password' => 432123,
'Bill_Id' => 153585611140,
'Payment_Id' => 8560103,
]);
or yours except the additional array
$info = $client->__call($method, $parameters);
EDIT:
Assuming to https://stackoverflow.com/a/5409465/1152471 the error could be on the server side, because the server sends an header back that is not compatible with SOAP 1.2 standard.
Maybe you have to use an third party library or even simple sockets to get it working.
Just use the following function. Have fun!
function WebServices($function, $parameters){
$username = '***';
$password = '***';
$url = "http://*.*.*.*/*/*/*WebService.svc?wsdl";
$service_url = 'http://*.*.*.*/*/*/*WebService.svc';
$client = new SoapClient($url, [
"soap_version" => SOAP_1_2,
"UserName"=>$username,
"Password"=>$password,
"SOAPAction"=>"http://tempuri.org/I*WebService/$function",
'cache_wsdl' => WSDL_CACHE_NONE, // WSDL_CACHE_MEMORY
'trace' => 1,
'exception' => 1,
'keep_alive' => false,
'connection_timeout' => 500000
]);
$action = new \SoapHeader('http://www.w3.org/2005/08/addressing', 'Action', "http://tempuri.org/I*WebService/$function");
$to = new \SoapHeader('http://www.w3.org/2005/08/addressing', 'To', $service_url);
$client->__setSoapHeaders([$action, $to]);
try{
return $client->__call($function, $parameters);
} catch(SoapFault $e){
return $e->getMessage();
}
}
I'm trying to connect to Royal Mail shipping API, but I'm receiving the famous Could not connect to host.
$api_password = "****";
$api_username = "****";
$api_application_id = "****";
$api_service_type = "D";
$api_service_code = "SD1";
$api_service_format = "";
$api_certificate_passphrase = "****";
$time = gmdate('Y-m-d\TH:i:s');
$created = gmdate('Y-m-d\TH:i:s\Z');
$nonce = mt_rand();
$nonce_date_pwd = xyz(copy from sample);
$passwordDigest = zyz(copy from sample);
$ENCODEDNONCE = zyz(copy from sample);
$soapclient_options = array();
$soapclient_options['cache_wsdl'] = 'WSDL_CACHE_NONE';
$soapclient_options['local_cert'] = "CA2+Splash+Felipe+RM10001654+usr.p12";
$soapclient_options['passphrase'] = $api_certificate_passphrase;
$soapclient_options['trace'] = true;
$soapclient_options['ssl_method'] = 'SOAP_SSL_METHOD_SSLv3';
$soapclient_options['location'] = '****';
//launch soap client
$client = new SoapClient("SAPI/ShippingAPI_V2_0_8.wsdl", $soapclient_options);
$client->__setLocation($soapclient_options['location']);
(setting header)
$HeaderObject = new SoapVar( $HeaderObjectXML, XSD_ANYXML );
//push soap header
$header = new SoapHeader( 'oasis-200401-wss-wssecurity-utility-1.0.xsd', 'Security', $HeaderObject );
$client->__setSoapHeaders($header);
(setting request part)
if($api_service_enhancements != "") {
$request['requestedShipment']['serviceEnhancements'] = array('enhancementType' => array('serviceEnhancementCode' => array('code' => $api_service_enhancements)));
}
//try make the call
try {
$response = $client->__soapCall('createShipment', array($request), array('soapaction' => '***api-link***') );
} catch (Exception $e) {
//catch the error message and echo the last request for debug
echo $e->getMessage();
echo "REQUEST:\n" . $client->__getLastRequest() . "\n";
die;
}
Is it correct the way I'm setting the connection and the local cert?
Is any information I'm missing?
Thanks & Regards
Follow my final code :) this one works for sure. Even have the retry in case the server is buzy, enjoy.
<?php
//ini_set('soap.wsdl_cache_enabled', '1');
ini_set('soap.wsdl_cache_enabled',0);
ini_set('soap.wsdl_cache_ttl',0);
class royalmaillabelRequest
{
private $apiapplicationid = "insert urs";
private $api_password = "insert urs";
private $api_username = "insert urs"; //"rxxxxxAPI"
private $api_certificate_passphrase = "insert urs";
private $locationforrequest = 'https://api.royalmail.com/shipping/onboarding'; //live 'https://api.royalmail.com/shipping' onbording 'https://api.royalmail.com/shipping/onboarding'
private $api_service_enhancements = "";
private function preparerequest(){
//PASSWORD DIGEST
$time = gmdate('Y-m-d\TH:i:s');
$created = gmdate('Y-m-d\TH:i:s\Z');
$nonce = mt_rand();
$nonce_date_pwd = xyz(copy from sample);
$passwordDigest = nyz(copy from sample);
$ENCODEDNONCE = (copy from sample);
//SET CONNECTION DETAILS
$soapclient_options = array();
$soapclient_options['cache_wsdl'] = 'WSDL_CACHE_NONE';
$soapclient_options['stream_context'] = stream_context_create(
array('http'=>
array(
'protocol_version'=>'1.0'
, 'header' => 'Connection: Close'
)
)
);
$soapclient_options['local_cert'] = dirname(__FILE__) . "/certificate.pem";
$soapclient_options['passphrase'] = $this->api_certificate_passphrase;
$soapclient_options['trace'] = true;
$soapclient_options['ssl_method'] = 'SOAP_SSL_METHOD_SSLv3';
$soapclient_options['location'] = $this->locationforrequest;
$soapclient_options['soap_version'] = 'SOAP_1_1';
//launch soap client
$client = new SoapClient(dirname(__FILE__) . "/SAPI/ShippingAPI_V2_0_8.wsdl", $soapclient_options);
$client->__setLocation($soapclient_options['location']);
//headers needed for royal mail//D8D094Fd2716E3Es142588808s317
$HeaderObjectXML = '<wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
<wsse:UsernameToken wsu:Id="UsernameToken-D8D094FC22716E3EDE14258880881317">
<wsse:Username>'.$this->api_username.'</wsse:Username>
<wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordDigest">'.$passwordDigest.'</wsse:Password>
<wsse:Nonce EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary">'.$ENCODEDNONCE.'</wsse:Nonce>
<wsu:Created>'.$created.'</wsu:Created>
</wsse:UsernameToken>
</wsse:Security>';
//push the header into soap
$HeaderObject = new SoapVar( $HeaderObjectXML, XSD_ANYXML );
//push soap header
$header = new SoapHeader( 'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd', 'Security', $HeaderObject );
$client->__setSoapHeaders($header);
return $client;
}
public function CreateShippiment($data){
$request = $this->buildCreateshippiment($data);
$type = 'createShipment';
return $this->makerequest($type, $request);
}
public function PrintLabel($shipmentNumber,$order_tracking_id){
$time = gmdate('Y-m-d\TH:i:s');
$request = array(
'integrationHeader' => array(
'dateTime' => $time,
'version' => '2',
'identification' => array(
'applicationId' => $this->apiapplicationid,
'transactionId' => $order_tracking_id
)
),
'shipmentNumber' => $shipmentNumber,
'outputFormat' => 'PDF',
);
$type = 'printLabel';
$response = $this->makerequest($type, $request);
return $response->label;
}
private function makerequest($type, $request){
$client = $this->preparerequest();
$response = false;
$times = 1;
while(true){
try {
$response = $client->__soapCall( $type, array($request), array('soapaction' => $this->locationforrequest) );
// echo "REQUEST:\n" . htmlentities($client->__getLastResponse()) . "\n";
break;
} catch (Exception $e) {
print_r($e);
if($e->detail->exceptionDetails->exceptionCode == "E0010" && $times <= 25){
sleep(1.5);
$times++;
continue;
}else{
echo $e->getMessage();
echo "<pre>";
print_r($e->detail);
echo $client->__getLastResponse();
echo "REQUEST:\n" . htmlentities($client->__getLastResponse()) . "\n";
break;
}
}
break;
}
return $response;
}
private function buildCreateshippiment($data2) {
$time = gmdate('Y-m-d\TH:i:s');
$data = new ArrayObject();
foreach ($data2 as $key => $value)
{
$data->$key = $value;
}
$request = array(
'integrationHeader' => array(
'dateTime' => $time,
'version' => '2',
'identification' => array(
'applicationId' => $this->apiapplicationid,
'transactionId' => $data->order_tracking_id
)
),
'requestedShipment' => array(
'shipmentType' => array('code' => 'Delivery'),
'serviceOccurrence' => 1,
'serviceType' => array('code' => $data->api_service_type),
'serviceOffering' => array('serviceOfferingCode' => array('code' => $data->api_service_code)),
'serviceFormat' => array('serviceFormatCode' => array('code' => $data->api_service_format)),
'shippingDate' => date('Y-m-d'),
'recipientContact' => array('name' => $data->shipping_name, 'complementaryName' => $data->shipping_company),
'recipientAddress' => array('addressLine1' => $data->shipping_address1, 'addressLine2' => $data->shipping_address2, 'postTown' => $data->shipping_town, 'postcode' => $data->shipping_postcode),
'items' => array('item' => array(
'numberOfItems' => $data->order_tracking_boxes,
'weight' => array( 'unitOfMeasure' => array('unitOfMeasureCode' => array('code' => 'g')),
'value' => $data->order_tracking_weight,
)
)
),
//'signature' => 0,
)
);
if($data->api_service_enhancements == 6 && $data->api_service_type == 1){
$request['requestedShipment']['serviceEnhancements'] = array('enhancementType' => array('serviceEnhancementCode' => array('code' => $data->api_service_enhancements)));
}
return $request;
}
}
docs.oasis-open.org is slow and doesn't respond in time.
Download oasis-200401-wss-wssecurity-utility-1.0.xsd and modify ShippingAPI_V2_0_8.wsdl to use local version.
Your location looks wrong..
$soapclient_options['location'] = '****';
Shouldn't this look like this..
$soapclient_options['location'] = 'https://api.royalmail.com/shipping/onboarding';
Before starting, I know, this errors means that I should have defined the property FinalBookingDate, but just keep reading and you will understand my point of view.
The url is: http://bestbuyhotel1.cangooroo.net/ws/2013/ClientBackOffice_b.asmx?op=getBookingList
I was testing first with SoapUi, and I successfull get the list that I need:
And on php, I only can get this response:
The SoapClient from php is:
$params = array('soap_version' => SOAP_1_2, 'compression' => SOAP_COMPRESSION_ACCEPT | SOAP_COMPRESSION_GZIP, 'encoding'=>'UTF-8', 'trace' => 1, 'exceptions' => true, 'cache_wsdl' => WSDL_CACHE_NONE, 'features' => SOAP_SINGLE_ELEMENT_ARRAYS);
$client = new \SoapClient('http://bestbuyhotel1.cangooroo.net/ws/2013/ClientBackOffice_b.asmx?wsdl', $params);
And then, the code to retrieve the data:
/*
$query = array(
'InitialServiceDate' => '2015-01-20',
'InitialBookingDate' => '2015-01-20',
'FinalBookingDate' => '2015-01-20',
'FinalServiceDate' => '2015-01-20',
'CreationUserId' => 1338,
'CityId' => 4166,
'ServiceTypes' => array('eServiceType' => 'HOTEL')
);
*/
$query = array(
'InitialBookingDate' => '2015-01-20',
'ServiceTypes' => array('eServiceType' => 'HOTEL')
);
$args = new \stdClass;
$args->credential = new \stdClass;
$args->credential->UserName = $conn['userPass']['usr'];
$args->credential->Password = $conn['userPass']['pass'];
$args->searchBookingCriteria = new \stdClass;
$args->searchBookingCriteria->InitialBookingDate = '2015-01-20';
$args->searchBookingCriteria->ServiceTypes = new \stdClass;
$args->searchBookingCriteria->ServiceTypes->eServiceType = 'HOTEL';
//$args = array('credential'=>$credentials, 'searchBookingCriteria' => $query);
$data = $conn['client']->getBookingList($args);
print_r($data);
exit;
As you can see, I tried 2 ways to send the $args to getBookingList, as far I know both of then is valid and yet both of then (with array or object) return the same error. On the code commented at first you can see that I tried to define all does properties that the web service asks but after defining all of then I get a empty result.
My question is, there is some extra param to define on SoapClient that I should do? Why the SoapUI can do it with success? What I have missing here?
Bonus: A print of SoapUI full screen with the default request including the optional params https://www.evernote.com/shard/s14/sh/fb5ac276-8147-4e09-95bb-afa0be66d7a6/d273441c74186bf1e600b42ab3303899/deep/0/SoapUI-5.0.0.png
Can you try this more direct approach:
try {
$params = array('soap_version' => SOAP_1_2, 'compression' => SOAP_COMPRESSION_ACCEPT | SOAP_COMPRESSION_GZIP, 'encoding'=>'UTF-8', 'trace' => 1, 'exceptions' => true, 'cache_wsdl' => WSDL_CACHE_NONE, 'features' => SOAP_SINGLE_ELEMENT_ARRAYS);
$client = new SoapClient('http://bestbuyhotel1.cangooroo.net/ws/2013/ClientBackOffice_b.asmx?wsdl',$params);
} catch (SoapFault $E) {
echo $E->faultstring;
}
if ($client) {
$req_params = array('credential' =>
array('userName' => 'XXXXXXX',
'Password' => 'XXXXXXX'),
'searchBookingCriteria' =>
array('BookingNumber' => array('int' => 'XXXXXXXXX'),
'ServiceTypes' => array('eServiceType' => 'HOTEL'),
'PassengerName'=> 'XXXXXXXX',
'InitialBookingDate'=> '2015-01-16',
'FinalBookingDate'=> '2015-01-16',
'InitialServiceDate' => '2015-01-18',
'FinalServiceDate' => '2015-01-18',
'BookingStatus'=> array('eStatus' => 'ACTIVATED'),
'PaymentStatus'=> array('ePaymentStatus' => 'Payed'),
'CreationUserId'=> 'XXX',
'CityId'=> 'XXXX',
'ExternalReference'=> '')
);
$response = $client->__soapCall('getBookingList',array($req_params));
var_dump($response);
}
Try (and add) this approach:
$args->searchBookingCriteria->FinalBookingDate = '2015-01-22';
$args->searchBookingCriteria->InitialServiceDate = '2015-01-22';
$args->searchBookingCriteria->FinalServiceDate = '2015-01-22';
$args->searchBookingCriteria->CreationUserId = 'abc';
$args->searchBookingCriteria->CityId = 'abc';