https://github.com/ideacrew/atp_validator
Validates ATP payloads against CMS business rules.
https://github.com/ideacrew/atp_validator
Last synced: 5 months ago
JSON representation
Validates ATP payloads against CMS business rules.
- Host: GitHub
- URL: https://github.com/ideacrew/atp_validator
- Owner: ideacrew
- Created: 2021-05-21T17:24:27.000Z (about 5 years ago)
- Default Branch: trunk
- Last Pushed: 2024-08-22T14:17:24.000Z (almost 2 years ago)
- Last Synced: 2024-08-22T16:07:46.668Z (almost 2 years ago)
- Language: XSLT
- Size: 35.8 MB
- Stars: 0
- Watchers: 15
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ATPValidator
Executes XML business rules to validate ATP payloads for OpenHBX.
## Building
This project is built for deployment into a stand-alone jar. This compiles all the JRuby resources into a single jar that can be run by itself.
```
ant dist
```
## Running
This application runs in two modes:
1. packet port mode: the application stays alive indefinitely receiving and sending messages using the port protocol, with packet size of 4. This is the default.
2. oneshot mode: the application reads the XML file from standard in and prints the results on standard out, then exits. Run with `--oneshot` to activate this mode. Example: `cat example.xml | java -jar atp_validator-0.2.0-jar-with-dependencies.jar --oneshot`
## Port Protocol
The port protocol is a simple, language-agnostic interoperability method that comes from Erlang.
Basically how it works is processes talk to each other by sending messages over standard in and standard out to each other.
Invoking a port works like this:
1. Encode the size of the message you are going to send to the application as a big-endian four-byte integer.
2. Send that four-byte specifier to the STDIN of the child process, followed by the message itself.
3. Wait to read back in, from the STDOUT of the child process, four bytes. These bytes are a big-endian value specifying the value of the response message.
4. Read the specified number of bytes back in from the STDOUT of the child process - this is your response message.
## Research
Prior to choosing to undertake this task in java, we considered multiple ruby libraries and frameworks.
The primary drivers are:
1. The schematron file (schematron/AccountTransfer-runtime.sch) is encoded in a XSLT 2.0 specific syntax, and requires support of that standard to work.
2. Limited support of XSLT 2.0