Extending support to other formats
This topic explains how to use the parser exit to create your own parser implementation. This determines how the payment details are displayed in the Electronic Signature UI.
Payload parser
Payload files contain information such as the number of payment operations, payment amount, account information, and so on. The parser provides methods to allow parsing of the payload files and retrieve the information.
Axway provides default implementation for the following parsers:
- Cfonb160 Transfer
- Cfonb160 Debit
- Cfonb320
- SEPA Transfer
- SEPA Debit
- Raw
The Raw parser only reads the payload file and displays the information as text. For large files the information is truncated and the parser only stores the first and last 1000 characters.
All these parsers are delivered as samples for the implementation of the CFONB160, CFONB320 and SEPA file formats to show how to extend the file format support or just to customize the existing parser implementation.
Modifying the parser exit
The parser samples are located in <Electronic Signature_install_dir>\devKit\parser.
- Make sure that you have maven installed and the command line mvn is on the system PATH environment variable.
- Enter: mvn clean install.
- The build creates a target directory where the compiled class and a new fex-es-parser-sample-{version}.jar file are generated.
- To implement your own parser, consult the javadoc of the parser library, located in <Electronic Signature_install_dir>\devKit\parser\docs\ and analyze the sample.
- After creating your own parser, edit the <Electronic Signature_install_dir>\conf\configuration.properties file and add your parser to the payload parser section:
- payLoad.parser.name.1=YourParserName
- payLoad.parser.class.1=com.axway.fex.es.samples.parser.YourParserName
- Add the JAR file to the external.classpath property
- Check that these lines are not commented out with a # character
- At startup, Electronic Signature will add the sample JAR file to the classpath.
Related topics
Configuring Electronic Signature