SOAP queries for testing
This page describes and explains some sample queries. These queries can be used to check the data exchange between your own security server and the security server of another X-Road member. If there is no error message, the data exchange was successful and the communication between the two security servers worked.
NB: Sample requests must be adapted with your organization's info and your data exchange partner's info!
The query can be used to generate the UUID generator . The Enter_Here_UUID values of the sample queries must be replaced with the generated UUID, and a new UUID value must be used with each query.
Starting a query
You can run a query from the security server's command line with the following command:
curl -v -d @/tmp/request.xml -o /tmp/reply.xml -H "Content-type: text/xml; charset=UTF-8" http://SECURITY_SERVER/
In place of SECURITY_SERVER, write your Security Server's internal address instead.
You can also use SoapUI to send a query to the security server.
Example of listMethods query, using RIA xroad-center subsystem:
listMethods
<?xml version="1.0" encoding="utf-8"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xroad="http://x-road.eu/xsd/xroad.xsd"
xmlns:id="http://x-road.eu/xsd/identifiers">
<SOAP-ENV:Header>
<xroad:client id:objectType="SUBSYSTEM">
<id:xRoadInstance>ee-dev</id:xRoadInstance>
<id:memberClass>GOV</id:memberClass>
<id:memberCode>70006317</id:memberCode>
<id:subsystemCode>generic-consumer</id:subsystemCode>
</xroad:client>
<xroad:service id:objectType="SERVICE">
<id:xRoadInstance>ee-dev</id:xRoadInstance>
<id:memberClass>GOV</id:memberClass>
<id:memberCode>70006317</id:memberCode>
<id:subsystemCode>xroad-center</id:subsystemCode>
<id:serviceCode>listMethods</id:serviceCode>
</xroad:service>
<xroad:id>Enter_Here_UUID</xroad:id>
<xroad:protocolVersion>4.0</xroad:protocolVersion>
</SOAP-ENV:Header>
<SOAP-ENV:Body>
<xroad:listMethods/>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Before running a query, you need to change the xroad:client section to match your organization's member info:
<xroad:client id:objectType="SUBSYSTEM">
<id:xRoadInstance>ENVIRONMENT</id:xRoadInstance>
<id:memberClass>YOUR_MEMBER_CLASS</id:memberClass>
<id:memberCode>YOUR_MEMBER_CODE</id:memberCode>
<id:subsystemCode>YOUR_SUBSYSTEM_CODE</id:subsystemCode>
</xroad:client>
Values in capital letters must be replaced as follows:
- ENVIRONMENT - enter the X-tee environment: ee-dev, ee-test or EE (case sensitive)
- YOUR_MEMBER_CLASS - Enter the value of your organization's member class: COM, GOV, NGO or NEE
- YOUR_MEMBER_CODE - Enter the value of your organization's member code In the case of organization's registered in the Estonian äriregister, this is the registry code of the institution. For NEE members, it starts with NTR... .
- YOUR_SUBSYSTEM_CODE - Enter the value of your subsystem code you are using to query. The subsystem must be in the 'registered' status.
If you want to query the list of data services of another X-tee member's subsystem, you need to adapt the xroad:service section according to the information of the data exchange partner or service provider:
<xroad:service id:objectType="SERVICE">
<id:xRoadInstance>ENVIRONMENT</id:xRoadInstance>
<id:memberClass>PARTNERS_MEMBER_CLASS</id:memberClass>
<id:memberCode>PARTNERS_MEMBER_CODE</id:memberCode>
<id:subsystemCode>PARTNERS_SUBSYSTEM_CODE</id:subsystemCode>
<id:serviceCode>SERVICE_CODE</id:serviceCode>
</xroad:service>
Values in capital letters must be replaced as follows:
- ENVIRONMENT - enter either ee-dev, ee-test or EE (case sensitive) here. Must match the environment written in the xroad:client section!
- PARTNER_MEMBER_CLASS - enter the member class value of the service provider, either COM, GOV, NGO or NEE
- PARTNER_MEMBER_CODE - Enter the value of the member code of the service provider here. In the case of institutions registered in the Estonian äriregister this is the registry code of the organization. For NEE members, it starts with NTR... .
- PARTNERI_SUBSYSTEM_CODE - Enter here the value of the subsystem code of the service provider's subsystem that provides data services.
- NB: For the request to be successful, the service provider must have given your subsystem access to its services
- SERVICE_CODE - Enter the code of the service you want to query here. An example is listMethods, which returns a list of services provided by the subsystem.
Example of allowedMethods query:
<?xml version="1.0" encoding="utf-8"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:ns1="http://aar.x-road.ee/producer/"
xmlns:xroad="http://x-road.eu/xsd/xroad.xsd"
xmlns:id="http://x-road.eu/xsd/identifiers">
<SOAP-ENV:Header>
<xroad:client id:objectType="SUBSYSTEM">
<id:xRoadInstance>ee-dev</id:xRoadInstance>
<id:memberClass>GOV</id:memberClass>
<id:memberCode>70006317</id:memberCode>
<id:subsystemCode>generic-consumer</id:subsystemCode>
</xroad:client>
<xroad:service id:objectType="SERVICE">
<id:xRoadInstance>ee-dev</id:xRoadInstance>
<id:memberClass>GOV</id:memberClass>
<id:memberCode>70006317</id:memberCode>
<id:subsystemCode>dhl</id:subsystemCode>
<id:serviceCode>allowedMethods</id:serviceCode>
</xroad:service>
<xroad:id>Enter_Here_UUID</xroad:id>
<xroad:protocolVersion>4.0</xroad:protocolVersion>
</SOAP-ENV:Header>
<SOAP-ENV:Body>
<xroad:allowedMethods/>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
If the service provider has granted access rights to their service, the response will show one or more allowed services:
<SOAP-ENV:Body>
<xroad:allowedMethodsResponse>
...
<id:serviceCode>receiveDocuments</id:serviceCode>
</xroad:service>
If no access rights have been granted, the response to the request is empty:
<SOAP-ENV:Body>
<xroad:allowedMethodsResponse/>
</SOAP-ENV:Body>
Example of getWSDL query:
<?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:xroad="http://x-road.eu/xsd/xroad.xsd">
<SOAP-ENV:Header>
<xroad:client id:objectType="SUBSYSTEM">
<id:xRoadInstance>ee-dev</id:xRoadInstance>
<id:memberClass>GOV</id:memberClass>
<id:memberCode>70006317</id:memberCode>
<id:subsystemCode>riha</id:subsystemCode>
</xroad:client>
<xroad:service id:objectType="SERVICE">
<id:xRoadInstance>ee-dev</id:xRoadInstance>
<id:memberClass>GOV</id:memberClass>
<id:memberCode>70006317</id:memberCode>
<id:subsystemCode>aar</id:subsystemCode>
<id:serviceCode>getWsdl</id:serviceCode>
</xroad:service>
<xroad:id>Enter_Here_UUID</xroad:id>
<xroad:protocolVersion>4.0</xroad:protocolVersion>
</SOAP-ENV:Header>
<SOAP-ENV:Body>
<xroad:getWsdl>
<xroad:serviceCode>oigused</xroad:serviceCode>
<xroad:serviceVersion>v1</xroad:serviceVersion>
</xroad:getWsdl>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>