<p>I'm looking for a Java library for SWIFT messages. I want to</p>

<ul>
<li>parse SWIFT messages into an object model</li>
<li>validate SWIFT messages (including SWIFT network validation rules)</li>
<li>build / change SWIFT messages by using an object model</li>
</ul>

<p>Theoretically, I need to support all SWIFT message types. But at the moment I need MT103+, MT199, MT502, MT509, MT515 and MT535.</p>

<p>So far I've looked at two libraries</p>

<ul>
<li>AnaSys Message Objects (<a href="http://www.anasys.com/products/messageobjects/" rel="noreferrer">link text</a>)</li>
<li>Datamation SWIFT Message Suite (<a href="http://www.paymentcomponents.com/swift/message_suite/components_suite.html" rel="noreferrer">link text</a>)</li>
</ul>

<p>Both libraries allow to accomplish the tasks mentioned above but in both cases I'm not really happy. </p>

<p>AnaSys uses a internal XML representation for all SWIFT messages which you need to know in order to access the fields of a message. And you need to operate on the DOM of the XML representation, there is no way to say "get the contents of field '50K' of the SWIFT message".</p>

<p>And the Datamation library seems to have the nicer API but does not find all errors.</p>

<p>So does anyone know other SWIFT libraries to use? </p>

[{'answer_id': 25230, 'author': 'vzczc', 'author_id': 224, 'author_profile': 'https://Stackoverflow.com/users/224', 'pm_score': 0, 'selected': False, 'text': '<p>I can not really help you out with a Java implementation. Microsoft of course, have their own Biztalk adapter for ISO15022 and 20022. And they will actually do the validation fairly well. But as you say you are actually looking for a java solution.  </p>\n\n<p>You might find, as I did when I researched this 6 years ago, that mapping FIN messages to XML and then to into objects, a standard library will only get you partly to your goal. You will have to integrate this with your backend application and whatever market practices you face in the particular messages you need to support.  </p>\n\n<p>I finally ended up writing a generic FIN parser /150022 class library  in c++.</p>\n\n<p>Anyway, good luck. An idea is to be more specific in your question. What types of messages do you need to support?</p>\n'}, {'answer_id': 40002, 'author': 'jodonnell', 'author_id': 4223, 'author_profile': 'https://Stackoverflow.com/users/4223', 'pm_score': 5, 'selected': False, 'text': '<p>Have you looked at <a href="http://wife.sourceforge.net/" rel="noreferrer">WIFE</a>?  We use that in our application which translates SWIFT messages to an internal XML format and back again.  We haven\'t had any problems with it.  Also, it\'s licensed under the LGPL, so you can hack it up if you need to.  Check it out.</p>\n'}, {'answer_id': 178394, 'author': 'ddimitrov', 'author_id': 18187, 'author_profile': 'https://Stackoverflow.com/users/18187', 'pm_score': 1, 'selected': False, 'text': '<p>If your company is not comfortable with the LGPL license, You might want to check Progress <a href="http://www.sonicsoftware.com/products/sonic_esb/adapters_sonic_esb/adapter_list/index.ssp" rel="nofollow noreferrer">Sonic ESB</a>,  or <a href="http://www.iona.com/products/artix/data_services/standards_libraries.htm" rel="nofollow noreferrer">ArtixDS</a> (recently acquired), TIBCO <a href="http://www.tibco.com/software/application_integration/adapters/default.jsp" rel="nofollow noreferrer">ActiveWhatever</a> or Oracle/BEA Aqualogic. Chances are you are already using something from these companies and you can get decent discount.</p>\n'}, {'answer_id': 289190, 'author': 'Julien Grenier', 'author_id': 23051, 'author_profile': 'https://Stackoverflow.com/users/23051', 'pm_score': 2, 'selected': False, 'text': "<p>There is a product call Volanté that make a great job. Their solution is certified by SWIFT and the integration is easy ( I sound like I'm working for them ... I'm not). I've been using it since a couple of month . </p>\n\n<p>IBM is also offering a solution (cannot remember to name right now) but then you are committed to the big blue.</p>\n"}, {'answer_id': 433976, 'author': 'Marcus Leon', 'author_id': 47281, 'author_profile': 'https://Stackoverflow.com/users/47281', 'pm_score': 0, 'selected': False, 'text': "<p>Along with jodonnell, we also use WIFE. It works very well.  I'm not sure if it does the network validation rules (#2 on your list) though.</p>\n"}, {'answer_id': 1067648, 'author': 'Community', 'author_id': -1, 'author_profile': 'https://Stackoverflow.com/users/-1', 'pm_score': 5, 'selected': True, 'text': '<p>SWIFT is releasing a "Standards Developer Kit" which includes an "MT/XML Schema Library".</p>\n\n<p>From the doc:\n"The MT/XML Schema Library is a complete set of XML schema definitions for MT messages, and software which shows how to convert messages from an MT format to an MT XML representation and back. This approach allows XML integration between applications while the MT (FIN) format will continue to be transported over the SWIFT network."</p>\n\n<p>Java source code will also be made available, again from the doc:\n"Working sample Java source code that converts a message in MT format to an XML instance and from an XML instance to a message in MT format."</p>\n\n<p>See: <a href="http://www.swift.com/support/drc/develop/standards.page" rel="noreferrer">http://www.swift.com/support/drc/develop/standards.page</a></p>\n\n<p>This can be a great aid in dealing with FIN messages in XML syntax.</p>\n'}, {'answer_id': 2912070, 'author': 'Ilya Saunkin', 'author_id': 309946, 'author_profile': 'https://Stackoverflow.com/users/309946', 'pm_score': 0, 'selected': False, 'text': '<p>paymentcomponents (<a href="http://www.paymentcomponents.com/" rel="nofollow noreferrer">http://www.paymentcomponents.com/</a>) parser was easy to use and found all errors. Their site definitely needs work but if u look there, u\'ll find what u r looking for</p>\n'}, {'answer_id': 9796002, 'author': 'zzz', 'author_id': 1282091, 'author_profile': 'https://Stackoverflow.com/users/1282091', 'pm_score': 3, 'selected': False, 'text': '<p>You can combine the open source implementation WIFE with the commercial validation component from <a href="http://www.prowidesoftware.com" rel="noreferrer">http://www.prowidesoftware.com</a>. It validates that the messages you create with the model or XML representation are good through SWIFT network validation rules.</p>\n'}, {'answer_id': 67140150, 'author': 'EvaBat', 'author_id': 3979194, 'author_profile': 'https://Stackoverflow.com/users/3979194', 'pm_score': 0, 'selected': False, 'text': '<p>Datamation\'s libraries have evolved since then. If you need a corresponding solution in 2021, you can check <a href="https://finaplo.paymentcomponents.com/financial-messages" rel="nofollow noreferrer">FINaplo</a> by PaymentComponents (formerly called Datamation), a multi-purpose implementation for financial messages.</p>\n<p>It provides online validation/parse/translation/envelope services, Java SDKs, as well as REST solutions, all including error specifications. I am actually one of the authors.</p>\n<p>A demo for a SWIFT MT Java library can be found in this <a href="https://github.com/Payment-Components/demo-swift-mt" rel="nofollow noreferrer">GitHub link</a>.</p>\n'}]
['https://Stackoverflow.com/questions/25192', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/2367/']