KiReport en

From services.krediidiinfo.ee
Revision as of 13:18, 28 December 2007 by Rait (talk | contribs) (eesti keele link)
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.
Flag of Estonia.svg 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 can be obtained from: 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.


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://www.krediidiinfo.ee/services/KiReport.wsdl';
$server_url = 'https://services.krediidiinfo.ee/soap.php?name=KiReport'; 

$params = array('location' => $server_url
              , '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
               );

$client = new SoapClient($wsdl_url, $params);

$productCode = 'RAXXXE';
$subjectCode = '00000000';

$xml = $client->getReport($productCode, $subjectCode);

print_r($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>&amp; '  &quot; &lt; &gt;</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.