...
Code Block | ||||
---|---|---|---|---|
| ||||
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 downloadCreditCheckGetSubjectBasicReportdownloadGetSubjectBasicReport(){ $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; } |
...