Skip to end of metadata
Go to start of metadata
You are viewing an old version of this page. View the current version.
Compare with Current
View Page History
« Previous
Version 2
Next »
Vzorový kód pro přístup k WS CreditCheck z prostředí PHP.
function downloadCreditCheck()
{
$wsdl = 'http://creditwebservices.creditcheck.cz/CreditCheckAktualizace.asmx?wsdl';
$cc = new SoapClient($wsdl, array('location' => "http://creditwebservices.creditcheck.cz/CreditCheckAktualizace.asmx",
'uri' => "http://creditcheck.cz/"));
try {
$ch = array(
"Login" => "jmeno",
"Password" => "heslo",
);
$cc->__setSoapHeaders(new SoapHeader("http://creditcheck.cz/", "CreditCheckHeader", $ch));
$ret = $cc->GetCreditChecks();
} catch (SoapFault $e) {
print_r($e);
$ret = $e->faultstring;
print_r($ret);
}
return $ret;
}
function downloadCreditCheckBatch($batchIndex)
{
$wsdl = 'http://creditwebservices.creditcheck.cz/CreditCheckAktualizace.asmx?wsdl';
$cc = new SoapClient($wsdl, array('location' => "http://creditwebservices.creditcheck.cz/CreditCheckAktualizace.asmx",
'uri' => "http://creditcheck.cz/"));
try {
$ch = array(
"Login" => "jmeno",
"Password" => "heslo",
);
$cc->__setSoapHeaders(new SoapHeader("http://creditcheck.cz/", "CreditCheckHeader", $ch));
$ret = $cc->GetCreditCheckBatch(
array("lastBatchIndex" => $batchIndex)
);
} catch (SoapFault $e) {
print_r($e);
$ret = $e->faultstring;
print_r($ret);
}
return $ret;
}
function downloadGetSubjectBasicReport(){
$wsdl = 'http://creditwebservices.creditcheck.cz/CreditCheckAktualizace.asmx?wsdl';
$cc = new SoapClient($wsdl, array('location' => "http://creditwebservices.creditcheck.cz/CreditCheckAktualizace.asmx",
'uri' => "http://creditcheck.cz/"));
try {
$ch = array(
"Login" => "jmeno",
"Password" => "heslo",
);
$cc->__setSoapHeaders(new SoapHeader("http://creditcheck.cz/", "CreditCheckHeader", $ch));
$params = new \SoapVar("
<GetSubjectBasicReport xmlns='http://creditcheck.cz/'>
<subjectData>
<requestSubject xmlns=''>
<reportVersion>2</reportVersion>
<subjectType>privatePerson</subjectType>
<birthNumber>7710109856</birthNumber>
<firstName>Jméno</firstName>
<surname>Příjmení</surname>
<address>
<street>Ulice</street>
<number>Číslo popisné</number>
<city>Město</city>
<zip>Psč</zip>
</address>
</requestSubject>
</subjectData>
</GetSubjectBasicReport>", XSD_ANYXML);
$ret = $cc->GetSubjectBasicReport($params);
} catch (SoapFault $e) {
print_r($e);
$ret = $e->faultstring;
print_r($ret);
}
return $ret;
}