X-Road Test Service is a testing tool for X-Road v6.4 and above. The implementation is based on XRd4J library.
Test Service application provides a single service that takes as parameters the size of the response body and the size of the response attachment part. The size defines the number of characters in the response. For example, the below request generates a response which SOAP body contains 25 characters (see full request).
<request>
<responseBodySize>25</responseBodySize>
<responseAttachmentSize>0</responseAttachmentSize>
</request>
In addition to the characters specified in the request, the response alsp contains the time that was used for generating the requested string (see full response).
<response>
<data>ibWHohGndjaJUJvyOBwmfqIZb</data>
<processingTime>1</processingTime>
</response>
The fastest and easiest way to try out the application is to download the executable jar version (test-service-0.0.1.jar
) and run it: java -jar test-service-0.0.1.jar
. The application is accessible at:
http://localhost:8080/test-service-0.0.1/Endpoint
The WSDL description is accessible at:
http://localhost:8080/test-service-0.0.1/Endpoint?wsdl
- Java 6 or later
- Tomcat 6 or later
Setting up development environment is explained in wiki.
See instructions for building the code.
- Build the project and produce
test-service-0.0.2-SNAPSHOT.jar
file. - Run the application:
$ java -jar test-service-0.0.2-SNAPSHOT.jar
.
- Build the project and produce
test-service-0.0.2-SNAPSHOT.war
file. - Copy the file
tomcat.home/webapps
folder. - Start/restart Tomcat.
After installation (both JAR and WAR) the application is accessible at:
http://localhost:8080/test-service-0.0.2-SNAPSHOT/Endpoint
The WSDL description is accessible at:
http://localhost:8080/test-service-0.0.2-SNAPSHOT/Endpoint?wsdl
N.B. If you want to connect the services to X-Road Security Server you must update your server's IP address / host name to the WSDL file. Look for the below line and replace the default URL with your server's IP / host name.
<soap:address location="http://localhost:8080/test-service-0.0.2-SNAPSHOT/Endpoint" />
Calling the service after installation when Tomcat is running.
SOAP request can be found in the examples
folder.
curl -d @request-1.xml --header "Content-Type: text/xml" -X POST http://localhost:8080/test-service-0.0.2-SNAPSHOT/Endpoint
Example SOAP response can be found in the examples
folder.