modification code pour utilisation soap features SOAP_SINGLE_ELEMENT_ARRAYS

This commit is contained in:
Michael RICOIS 2009-10-26 16:52:40 +00:00
parent 12e646f5dc
commit b980a0e619

View File

@ -31,6 +31,7 @@ function getCompanyMatchIdentifiers($pays)
try
{
$result = $graydon->getCompanyMatchIdentifiers($request);
$firephp->log($result,'CompanyMatchIdentifiers');
//Enregistrement de l'action dans les logs
$transactionIdentifier = $result->Service_Log->TransactionIdentifier;
$sessionID = $result->Service_Log->SessionID;
@ -45,7 +46,7 @@ function getCompanyMatchIdentifiers($pays)
$log->mode = $mode;
$log->save();
$tabIdentifiers = $result->CompanyMatchIdentifiers->CompanyMatchIdentifier->CompanyIdentifier;
$tabIdentifiers = $result->CompanyMatchIdentifiers->CompanyMatchIdentifier[0]->CompanyIdentifier;
//Stockage du résultat de la méthode en cache
$matchidentifiers = new Matchidentifiers();
@ -290,15 +291,18 @@ function getCountryAvailability($pays)
$countryavailability = new Countryavailability();
$countryavailability = $q->fetchOne();
if($countryavailability == FALSE){
if($countryavailability == FALSE)
{
// Create the request parameters
$request = new StdClass();
// Initialise the request object
$request->Authentication_Parameters = $authentication;
$request->Country = $pays;
$firephp->log($request, 'request');
try
{
$result = $graydon->getCountryAvailability($request);
$firephp->log($result,'CountryAvailability');
//Enregistrement de l'action dans les logs
$transactionIdentifier = $result->Service_Log->TransactionIdentifier;
$sessionID = $result->Service_Log->SessionID;
@ -313,8 +317,8 @@ function getCountryAvailability($pays)
$log->mode = $mode;
$log->save();
$availability = $result->CountryAvailablity->CountryAndProduct->Products->Product;
$availability = $result->CountryAvailablity->CountryAndProduct[0]->Products->Product;
//Stockage du résultat de la méthode en cache
$countryavailability = new Countryavailability();
$countryavailability->country = $pays;
@ -351,7 +355,8 @@ function getCompanyMatchMethods($pays)
$matchmethods = new Matchmethods();
$matchmethods = $q->fetchOne();
if($matchmethods == FALSE){
if($matchmethods == FALSE)
{
// Create the request parameters
$request = new StdClass();
// Initialise the request object
@ -374,7 +379,7 @@ function getCompanyMatchMethods($pays)
$log->mode = $mode;
$log->save();
$methods = $result->CompanyMatchMethods->CompanyMatchMethod->MatchMethods->MatchMethod;
$methods = $result->CompanyMatchMethods->CompanyMatchMethod[0]->MatchMethods->MatchMethod;
//Stockage du résultat de la méthode en cache
$matchmethods = new Matchmethods();
@ -420,7 +425,7 @@ function getIdentite($identifier, $CompanyProductIdentifier, $file, $format = 'x
try
{
$placeOrderResult = $graydon->placeOrder($request);
//Enregistrement de l'action dans les logs
$transactionIdentifier = $placeOrderResult->Service_Log->TransactionIdentifier;
$sessionID = $placeOrderResult->Service_Log->SessionID;
@ -513,7 +518,7 @@ function getIdentite($identifier, $CompanyProductIdentifier, $file, $format = 'x
try
{
$reportResult = $graydon->getCompanyReport($request);
$firephp->log($reportResult, 'CompanyReport');
//Enregistrement de l'action dans les logs
$transactionIdentifier = $reportResult->Service_Log->TransactionIdentifier;
$sessionID = $reportResult->Service_Log->SessionID;