KiReport en
Jump to navigation
Jump to search
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 Krediidiinfo AS
* Certificate issued by Krediidiinfo is needed to use KiReport interface.
*
* @author Rait Kapp <rait@krediidiinfo.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 Krediidiinfo 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!
Krediidiinfo has not granted permission for client to request certain report. To get permissions contact client support.