Prowide Core
Typed MT Classes for Every Message Type
Prowide Core provides a complete Java object model for all SWIFT FIN MT messages. Each message type has a dedicated class (MT103, MT202, MT940, etc.) with typed field accessors, fluent setters, and built-in serialization. Fields are represented by individual classes (Field20, Field32A, Field59, etc.) with semantic getters for each component.
// Create an MT103 with typed fields
final MT103 m = new MT103();
m.setSender("FOOSEDR0AXXX");
m.setReceiver("FOORECV0XXXX");
m.addField(new Field20("REFERENCE"));
m.addField(new Field23B("CRED"));
Field32A f32A = new Field32A()
.setDate(Calendar.getInstance())
.setCurrency("EUR")
.setAmount("1234567,89");
m.addField(f32A); Parse Any MT Message into Java Objects
Parse raw SWIFT FIN content into fully typed Java objects. Use MT103.parse() for known types or AbstractMT.parse() for generic parsing. Access individual fields with typed getters that return component-level data -- dates as Calendar, amounts as BigDecimal, BICs as structured objects.
// Parse an MT103 from a file
MT103 mt = MT103.parse(
Lib.readResource("mt103.txt", null));
System.out.println(
"Sender: " + mt.getSender());
// Typed field access
Field32A f = mt.getField32A();
SimpleDateFormat sdf =
new SimpleDateFormat("yyyy/MM/dd");
System.out.println("Value Date: "
+ sdf.format(
f.getDateAsCalendar().getTime()));
System.out.println("Amount: "
+ f.getCurrency()
+ " " + f.getAmount()); JSON & XML Conversion
Convert any MT message to JSON with a single method call using toJson(). The library also supports conversion to Prowide's proprietary XML format for integration scenarios. Parse back from JSON or XML into the full object model for round-trip processing.
// Parse raw FIN into a SwiftMessage
SwiftParser parser =
new SwiftParser(fin);
SwiftMessage mt = parser.message();
// Convert to JSON
String json = mt.toJson();
System.out.println(json);
// Convert to proprietary XML
String xml = mt.toXml();
// Parse back from JSON
SwiftMessage fromJson =
SwiftMessage.fromJson(json); RJE & Batch File Processing
Read and write SWIFT RJE (Remote Job Entry) files containing multiple messages. The I/O module handles batch processing, message splitting, and file-level operations. Parse files containing multiple MT messages and process them individually, or write collections of messages back to RJE format.
// Read an RJE file with multiple messages
RJEReader reader =
new RJEReader(
new FileInputStream("batch.rje"));
String msg;
while ((msg = reader.next()) != null) {
AbstractMT mt = AbstractMT.parse(msg);
System.out.println(
mt.getMessageType()
+ " " + mt.getSender());
}
// Write messages to RJE format
RJEWriter writer =
new RJEWriter(
new FileOutputStream("out.rje"));
writer.write(mt103);
writer.close(); BIC & IBAN Validation
Built-in utilities for validating BIC (Business Identifier Code) and IBAN (International Bank Account Number) structures. The validators check format compliance, check digit verification, and country-specific rules -- all included in the open source library at no cost.
// BIC validation
BIC bic = new BIC("DEUTDEFFXXX");
System.out.println(
"Valid: " + bic.isValid());
System.out.println(
"Institution: "
+ bic.getInstitution());
System.out.println(
"Country: " + bic.getCountry());
// IBAN validation
IBAN iban = new IBAN(
"ES6621000418401234567891");
System.out.println(
"Valid: " + iban.isValid());
System.out.println(
"BBAN: "
+ iban.getBban()); JPA Entity Model
Prowide Core includes a JPA-annotated entity model for persisting SWIFT messages in relational databases. Store, query, and retrieve messages using standard JPA/Hibernate without building your own persistence layer. The entity model maps the full message structure -- headers, blocks, fields, and sequences -- into database tables.
Category 1 -- Customer Payments
MT101, MT103, MT103STP, MT103REMIT, MT104, MT107, and related messages for customer payment instructions and notifications.
Category 2 -- Financial Institution Transfers
MT200, MT202, MT202COV, MT203, MT204, MT205, MT205COV for bank-to-bank transfers and cover payments.
Category 3 -- FX & Derivatives
MT300, MT304, MT305, MT306, MT320, MT330, MT340, MT350 for foreign exchange, money markets, and derivatives.
Category 4 -- Collections & Cash Letters
MT400, MT405, MT410, MT412, MT416, MT420, MT422, MT450, MT455, MT456 for documentary collections.
Category 5 -- Securities
MT502-MT599 for securities settlement, corporate actions, collateral management, and reporting. Includes complex sequence-based messages.
Categories 6-9
Trade finance (7xx), travellers cheques (8xx), cash management (9xx including MT940, MT942, MT950), plus system messages (0xx) and common group messages (nxx).