ConsumerId = 'a1234'; //$gServiceHeader->CustomerId = 'a1234'; $gServiceHeader->Provider = new StdClass; $gServiceHeader->Provider->ProviderId = 'SED'; $gServiceHeader->Provider->CountryCode = 'FR'; $gServiceHeader->TimeStamp = date('Y-m-d\TH:i:s'); $gServiceHeader->TestIndication = true; if (NDEBUG) { $soap_header = new SoapHeader(SERVICES_URL.'schema/services/shared/1.0', 'ServiceHeader', $gServiceHeader); $soap_client = new SoapClient(SERVICES_URL. 'wsdl/credit-data-service-provider-api-1.0.wsdl', array('soap_version' => SOAP_1_1, 'trace' => true)); $soap_client->__setSoapHeaders($soap_header); } $fonction = ''; $o = new StdClass; switch ($action) { case 'Ping': $o->Type = 'simple'; $fonction = 'Ping'; break; case 'RetrieveOptions': $o->CompanyId = $companyId; $fonction = 'RetrieveOptions'; break; case 'OrderDataSet': $o->CompanyId = $companyId; $o->DataSetType = new StdClass; //$o->DataSetType->_ = 'CreditRecommendation'; $o->DataSetType->_ = 'Full'; $o->DataSetVersion = VERSION; $o->LanguageCode = 'fr'; $fonction = 'OrderDataSet'; break; case 'RetrieveOrderStatus': $o->ProviderOrderId = $providerOrderId; $fonction = 'RetrieveOrderStatus'; break; case 'RetrieveDataSet': $o->ProviderOrderId = $providerOrderId; $fonction = 'RetrieveDataSet'; break; case 'StartInvestigation': $o->CompanyId = $companyId; $o->DataSetType = new StdClass; $o->DataSetType->_ = 'Full'; $o->DataSetVersion = VERSION; $o->ServiceLevelName = 'Normal'; $o->LanguageCode = 'fr'; $fonction = 'StartInvestigation'; break; case 'StartMonitoring': $o->CompanyId = $companyId; $o->CategoryName = 'All'; $o->EventType = 'EventOnly'; $o->MonitoringVersion = '1.0'; $o->LanguageCode = 'fr'; //$o->PreferredStartDate = ; //$o->PreferredEndDate = ; $fonction = 'StartMonitoring'; break; case 'StopMonitoring': $o->ProviderOrderId = $providerOrderId; //$o->PreferredEndDate = ; $fonction = 'StopMonitoring'; break; case 'UpdateMonitoringOptions': $o->ProviderOrderId = $providerOrderId; //$o->NewCategoryName = ; $o->NewEventType = 'EventWithData'; //$o->NewMonitoringVersion = ; //$o->NewLanguageCode = ; $o->NewPreferredStartDate = date('Y-m-d'); $fonction = 'UpdateMonitoringOptions'; break; default: print 'erreur: fonction inconnue'; exit; } print '
'; if (NDEBUG) { print_r($soap_header); } print '"; ?>
'; print_r($o); print '
'; if (NDEBUG) { print_r($soap_client->__call($fonction, array($o))); //print '
'; //print 'Requete: '.htmlspecialchars($soap_client->__getLastRequest()); //print '
'; //print 'Reponse: '.htmlspecialchars($soap_client->__getLastResponse()); } else { require_once 'credit-data/v1/index.php'; print_r(call_user_func($fonction, $o)); } print "