-
Requirements to build standalone: Java17
Execute:
./gradlew -Pprod clean bootJar
java -jar build/libs/xtr-0.0.1-SNAPSHOT.jar
-
Executing in Docker container:
Execute:
docker compose up to see output on current command line; or
docker compose up -dto run docker container detached.
Configuration values are stored in application.yml
with default location in the source tree src/main/resources/application.yml.
application.dslPath: location of XTR DSL's
# default value for Docker container
application:
dslPath: /DSLServices are defined as YAML-formatted DSLs in folder specified in application.dslPath property.
The directory format should be <dslPath>/<service provider>/<service name>.
params:
- <list of allowed parameters>
service: <uri of service>
method: <GET|POST>
envelope: <XRoad envelope as XML>envelopecan contain handlebars mappings for parameters- Only parameters specified in
paramswill be applied for handlebars mappings
All services are served as POST endpoints.
POST /<service provider>/<service_name>
with optional parameters as JSON object in request body.
There are few open Äriregister (E-Business Register) services included as an example. To test if XTR is running and can access those services, call to specified endpoints can be made.
curl localhost:9020/ar/ettevottegaSeotudIsikud_v1 -H 'Content-type: application/json' -d '{"reg_code": 70006317 }'