Created
March 14, 2014 08:16
-
-
Save esaounkine/9543883 to your computer and use it in GitHub Desktop.
parsing and validation an MT (more examples http://wiki.datamation.gr/x/OIBH)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
protected void testMessage(String messageContent) throws InvalidMessageFormatException { | |
//parse message string to the SwiftMessage object | |
SwiftMessage message = new SwiftMsgProcessor().ParseMsgStringToObject(messageContent); | |
//validate SwiftMessage (parsed from String or built programmatically) | |
SwiftMsgValidator validator = new SwiftMsgValidator(); | |
SwiftValidObj validation = validator.validateMsg(message); | |
//swift mt text | |
String mtMessageText = validation.getMessage(); | |
//obtain list of errors from the validation object | |
ValidationErrorList errorList = validation.getValidationErrorList(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment