KiReport en: Difference between revisions
(→Example in PHP: Muudetud näites kodeeringut. ISO-8859-1 -> ISO-8859-13) |
mNo edit summary |
||
(8 intermediate revisions by 4 users not shown) | |||
Line 8: | Line 8: | ||
= WSDL = | = WSDL = | ||
WSDL | WSDL is located at [http://services.krediidiinfo.ee/KiReport.wsdl http://services.krediidiinfo.ee/KiReport.wsdl]. | ||
= Methods = | = Methods = | ||
Line 32: | Line 32: | ||
| Subject code. (Depending on report subject can be a registry code of a company, personal identity code, etc) | | Subject code. (Depending on report subject can be a registry code of a company, personal identity code, etc) | ||
|- | |- | ||
| <b>Output | | <b>Output:</b> | ||
| xml | | xml | ||
| xs:string | | xs:string | ||
Line 39: | Line 39: | ||
== ''getAvailableReports'' == | |||
Requesting the list of available reports. | |||
{| style="border-style: solid; border-width: 1px;" | |||
! | |||
! Name | |||
! Type | |||
! Description | |||
|- | |||
| <b>Input:</b> | |||
| | |||
| | |||
| | |||
|- | |||
| | |||
| | |||
| | |||
| | |||
|- | |||
| <b>Output:</b> | |||
| xml | |||
| xs:string | |||
| Requested available reports list in XML format. XML schema in xsd format is located at [http://www.krediidiinfo.ee/schemas/services/KiReport__getAvailableReports.xsd http://www.krediidiinfo.ee/schemas/services/KiReport__getAvailableReports.xsd] and in png format [http://www.krediidiinfo.ee/schemas/services/KiReport__getAvailableReports.png KiReport__getAvailableReports.png]. An empty tag ''available_reports'' will be given in XML, if a person who requests do not have any available reports. | |||
|} | |||
=Example in PHP = | =Example in PHP = | ||
Line 47: | Line 72: | ||
<?php | <?php | ||
/** | /** | ||
* Example of using KiReport web service of | * Example of using KiReport web service of Creditinfo AS | ||
* Certificate issued by | * Certificate issued by Creditinfo is needed to use KiReport interface. | ||
* | * | ||
* @author Rait Kapp <rait@ | * @author Rait Kapp <rait@creditinfo.ee> | ||
* @created 18.09.2007 | * @created 18.09.2007 | ||
*/ | */ | ||
$wsdl_url = 'http:// | $wsdl_url = 'http://services.krediidiinfo.ee/KiReport.wsdl'; | ||
$server_url = 'https://services.krediidiinfo.ee/soap.php?name=KiReport'; | $server_url = 'https://services.krediidiinfo.ee/soap.php?name=KiReport&enc=UTF-8'; | ||
$params = array('location' => $server_url | $params = array('location' => $server_url | ||
, 'login' => 'online_code' // Online Code issued by | , 'login' => 'online_code' // Online Code issued by Creditinfo client management. Make sure that login value is string type (PHP bug?). | ||
, 'password' => 'passwd' | , 'password' => 'passwd' | ||
Line 67: | Line 92: | ||
// , 'proxy_host' => 'cache.neti.ee' // If necessary use proxy and proxy port. | // , 'proxy_host' => 'cache.neti.ee' // If necessary use proxy and proxy port. | ||
// , 'proxy_port' => 8080 | // , 'proxy_port' => 8080 | ||
, 'encoding' => ' | , 'encoding' => 'UTF-8' | ||
); | ); | ||
Line 78: | Line 103: | ||
print_r($xml); | print_r($xml); | ||
$xml = $client->getAvailableReports(); | |||
echo $xml; | |||
?> | ?> | ||
Line 109: | Line 138: | ||
==-20101 No permission for PRODUCT_CODE! == | ==-20101 No permission for PRODUCT_CODE! == | ||
Creditinfo has not granted permission for client to request certain report. To get permissions contact [[Klienditugi| client support]]. | |||
== -20102 Subject code value is missing! == | |||
The input parameter subjectCode has no any value. | |||
== -20103 Invalid subject code value! == | |||
Specified subject code is in wrong format. | |||
== -10186 No Report == | |||
There is no any reports for this subject. Example: not submitted annual report is requested. | |||
== -20104 No price registered for product PRODUCT_CODE! == | |||
The product price is not registered. Please contact the client support. | |||
== -20105 INVALID_TEST_REPORT == | |||
Test reports are generated for specific subject, product and inquirer. You get the error if one of them is wrong. | |||
== -10184 DATA_NOT_AVAILABLE == | |||
The report cannot be generated, because there is no any information about the subject in Creditinfo database. | |||
== -10183 INVALID_SUBJECT_CODE == | |||
Subject code does not exist. |
Latest revision as of 09:17, 13 October 2021
eesti keeles |
Introduction
KiReport is the name of a Web Service based on SOAP protocol for requesting reports about companies and persons. Requested reports are in XML format.
WSDL
WSDL is located at http://services.krediidiinfo.ee/KiReport.wsdl.
Methods
getReport
Report requesting
Name | Type | Description | |
---|---|---|---|
Input: | productCode | xs:string | Report (product) code |
subjectCode | xs:string | Subject code. (Depending on report subject can be a registry code of a company, personal identity code, etc) | |
Output: | xml | xs:string | Requested report in XML format. |
getAvailableReports
Requesting the list of available reports.
Name | Type | Description | |
---|---|---|---|
Input: | |||
Output: | xml | xs:string | Requested available reports list in XML format. XML schema in xsd format is located at http://www.krediidiinfo.ee/schemas/services/KiReport__getAvailableReports.xsd and in png format KiReport__getAvailableReports.png. An empty tag available_reports will be given in XML, if a person who requests do not have any available reports. |
Example in PHP
Example of using KiReport in PHP:
<?php
/**
* Example of using KiReport web service of Creditinfo AS
* Certificate issued by Creditinfo is needed to use KiReport interface.
*
* @author Rait Kapp <rait@creditinfo.ee>
* @created 18.09.2007
*/
$wsdl_url = 'http://services.krediidiinfo.ee/KiReport.wsdl';
$server_url = 'https://services.krediidiinfo.ee/soap.php?name=KiReport&enc=UTF-8';
$params = array('location' => $server_url
, 'login' => 'online_code' // Online Code issued by Creditinfo client management. Make sure that login value is string type (PHP bug?).
, 'password' => 'passwd'
/* If you want to use certificate, then uncomment this block and comment params login and password!
, 'local_cert' => 'path/certificate.pem' // Here goes path to certificate file.
, 'passphrase' => 'passwd' // Here goes password of certificate.
*/
// , 'proxy_host' => 'cache.neti.ee' // If necessary use proxy and proxy port.
// , 'proxy_port' => 8080
, 'encoding' => 'UTF-8'
);
$client = new SoapClient($wsdl_url, $params);
$productCode = 'RAXXXE';
$subjectCode = '00000000';
$xml = $client->getReport($productCode, $subjectCode);
print_r($xml);
$xml = $client->getAvailableReports();
echo $xml;
?>
Debugging
Developers can always use example report RAXXXE (productCode) for debugging. It is free of charge. The XML Schema of RAXXXE can be obtained from http://www.krediidiinfo.ee/schemas/report/RAXXXE.xsd.
The example of RAXXXE:
<?xml version="1.0" encoding="UTF-8"?> <report xmlns="http//www.krediidiinfo.ee/schemas/report/RAXXXE.xsd"> <date_tag>2007-10-23</date_tag> <date_time>2007-10-23T10:10:42</date_time> <int_tag>12345</int_tag> <decimal_tag>123456.789</decimal_tag> <string_tag>I am a string</string_tag> <codes_tag>& ' " < ></codes_tag> <est_character_tag>õ ä ö ü Õ Ä Ö Ü</est_character_tag> <subject_code>00000000</subject_code> </report>
The input parameter subjectCode value is always assigned to the tag subject_code.
Error Codes
-20101 No permission for PRODUCT_CODE!
Creditinfo has not granted permission for client to request certain report. To get permissions contact client support.
-20102 Subject code value is missing!
The input parameter subjectCode has no any value.
-20103 Invalid subject code value!
Specified subject code is in wrong format.
-10186 No Report
There is no any reports for this subject. Example: not submitted annual report is requested.
-20104 No price registered for product PRODUCT_CODE!
The product price is not registered. Please contact the client support.
-20105 INVALID_TEST_REPORT
Test reports are generated for specific subject, product and inquirer. You get the error if one of them is wrong.
-10184 DATA_NOT_AVAILABLE
The report cannot be generated, because there is no any information about the subject in Creditinfo database.
-10183 INVALID_SUBJECT_CODE
Subject code does not exist.