Suomi.fi for Service Developers
Go directly to contents.

Interface queries in registers

The Web Service performs an interface query to the client organisation’s interface through its Security Server and the Suomi.fi Data Exchange Layer. In SOAP implementations, the query format is as follows:

<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xrd="http://x-road.eu/xsd/xroad.xsd" xmlns:id="http://x-road.eu/xsd/identifiers">
<SOAP-ENV:Header>
<xrd:client id:objectType="SUBSYSTEM">
<id:xRoadInstance>FI</id:xRoadInstance>
<id:memberClass>GOV</id:memberClass>
<id:memberCode>0245437-2</id:memberCode>
<id:subsystemCode>ServiceViewClient</id:subsystemCode>
</xrd:client>
<xrd:service id:objectType="SERVICE">
<id:xRoadInstance>FI</id:xRoadInstance>
<id:memberClass>GOV</id:memberClass>
<id:memberCode>000000-1</id:memberCode>
<id:subsystemCode>TestSystem</id:subsystemCode>
<id:serviceCode>testService</id:serviceCode>
</xrd:service>
<xrd:protocolVersion>4.0</xrd:protocolVersion>
<xrd:id></xrd:id>
<xrd:userId></xrd:userId>
</SOAP-ENV:Header>
<SOAP-ENV:Body>
<ns1:testService xmlns:ns1="http://x-road.fi/producer">
<request>
<ssn>123456-2111</ssn>
</request>
</ns1:testService>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

Each data provider in the Data Exchange Layer is added in <xrd:service id:objectType="SERVICE"> tags.

The response to a query with a personal identity code is an XML message approved by the Data Exchange Layer where the readable data is in <response></response> tags. In the Suomi.fi Web Service, the response is displayed to the end user in a simplified format according to the Handlebars template.

It should be noted that all displayed data should be within the response tags. In other words, the aim is not to combine data from different data sources in the Web Service; that is done by the client organisation’s Adapter Service (or internal information system). In addition, the information cannot be an attachment to the message or a code set that would have to be opened at the Web Service end.

The response is formatted as:

<?xml version="1.0" encoding="utf-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:id="http://x-road.eu/xsd/identifiers" xmlns:xrd="http://x-road.eu/xsd/xroad.xsd">
<SOAP-ENV:Header>
<xrd:client id:objectType="SUBSYSTEM">
<id:xRoadInstance>FI</id:xRoadInstance>
<id:memberClass>GOV</id:memberClass>
<id:memberCode>0245437-2</id:memberCode>
<id:subsystemCode>ServiceViewClient</id:subsystemCode>
</xrd:client>
<xrd:service id:objectType="SERVICE">
<id:xRoadInstance>FI</id:xRoadInstance>
<id:memberClass>GOV</id:memberClass>
<id:memberCode>000000-1</id:memberCode>
<id:subsystemCode>TestSystem</id:subsystemCode>
<id:serviceCode>testService</id:serviceCode>
</xrd:service>
<xrd:userId>test</xrd:userId>
<xrd:id>ID11234</xrd:id>
<xrd:protocolVersion>4.0</xrd:protocolVersion>
</SOAP-ENV:Header>
<SOAP-ENV:Body>
<ts1:testServiceResponse xmlns:ts1="http://test.x-road.fi/producer">
<request>
<ssn>123456-2111</ssn>
</request>
<response>
<nimi>Mallidata</nimi>
<aika>TI 31.2.2016 15:00</aika>
<lisatieto>malliksi</lisatieto>
</response>
</ts1:testServiceResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

The HTML element styles in this example come from the Web Service Style Guide, but the client organisation is allowed to express wishes about the structure.


Updated: 1/11/2024

Are you satisfied with the content on this page?