#153 Warning issued by the SOAP web services

SVN:trunk[614]
This commit is contained in:
Romain Quetiez
2010-07-19 11:20:50 +00:00
parent bfc052805b
commit 74927428aa
4 changed files with 14 additions and 6 deletions

View File

@@ -385,7 +385,7 @@ abstract class TestBizModel extends TestHandler
protected function DoPrepare()
{
MetaModel::Startup($this->GetConfigFile(), true); // Load model only
MetaModel::Startup($this->GetConfigFile());
// #@# Temporary disabled by Romain
// MetaModel::CheckDefinitions();

View File

@@ -1323,7 +1323,7 @@ $aWebServices = array(
'admin', /* sPassword */
'PC burning', /* sDescription */
'The power supply suddenly started to warm up', /* sInitialSituation */
null, /* aCallerDesc */
new SOAPExternalKeySearch(), /* aCallerDesc */
new SOAPExternalKeySearch(array(new SOAPSearchCondition('id', 2))), /* aCustomerDesc */
new SOAPExternalKeySearch(array(new SOAPSearchCondition('id', 4))), /* aServiceDesc */
new SOAPExternalKeySearch(array(new SOAPSearchCondition('id', 1))), /* aServiceSubcategoryDesc */
@@ -1402,7 +1402,8 @@ $aWebServices = array(
new SOAPExternalKeySearch(array(new SOAPSearchCondition('id', 1))), /* aServiceSubcategoryDesc */
'sub product of the service', /* sProduct */
new SOAPExternalKeySearch(array(new SOAPSearchCondition('name', 'FLS Desktop'))), /* aWorkgroupDesc */
null, /* aImpact */
array(
), /* aImpact */
'1', /* sImpact */
'1', /* sUrgency */
),
@@ -1581,8 +1582,9 @@ class TestWebServicesDirect extends TestBizModel
$oWebServices = new WebServices();
global $aWebServices;
foreach ($aWebServices as $aWebService)
foreach ($aWebServices as $i => $aWebService)
{
echo "<h2>Test #$i - {$aWebService['verb']} </h2>\n";
$oRes = call_user_func_array(array($oWebServices, $aWebService['verb']), $aWebService['args']);
echo "<pre>\n";
print_r($oRes);

View File

@@ -44,10 +44,16 @@ class SOAPExternalKeySearch
{
public $conditions; // array of SOAPSearchCondition
public function __construct($aConditions)
public function __construct($aConditions = null)
{
$this->conditions = $aConditions;
}
public function IsVoid()
{
if (is_null($this->conditions)) return true;
if (count($this->conditions) == 0) return true;
}
}

View File

@@ -500,7 +500,7 @@ class WebServices
static protected function SoapStructToExternalKeySearch(SoapExternalKeySearch $oExternalKeySearch)
{
if (is_null($oExternalKeySearch)) return null;
if ($oExternalKeySearch->IsVoid()) return null;
$aRes = array();
foreach($oExternalKeySearch->conditions as $oSearchCondition)