Code Monkey home page Code Monkey logo

prowide-core's Introduction

alt tag

Prowide Core is an open source Java framework for managing SWIFT FIN messages.

The project (previously known as WIFE) is active since 2006, production ready and commercially supported.

What's included?

  • Java model for ISO 15022 MT (for example: MT103 and Field32A classes, for all MT message categories)
  • Parser from SWIFT MT (FIN or RJE) into Java
  • Builder API from Java to SWIFT MT (FIN or RJE)
  • Conversion between SWIFT MT and JSON
  • Conversion between SWIFT MT and proprietary XML for MT
  • JPA entities model for MT message persistence
  • BIC and IBAN validation

For ISO 20022 model, parser and builder API check the https://github.com/prowide/prowide-iso20022 project

For SWIFT messages validation, translations, GUI application and more, please check Prowide's complementary commercial offerings at http://www.prowidesoftware.com/

Documentation

Distribution

Latest public binary DOWNLOAD is available at https://dev.prowidesoftware.com/SRU2022/getting-started/download-core/

SRU updates are made available on October (one month before SWIFT production date) for the general public, and 6 months in advance for subscribed customers.

License

Apache License 2.0

SWIFT is a trademark of S.W.I.F.T. SCRL. (www.swift.com)

Build

  • run ./gradlew build to build the library

Make sure your IDE encoding is UTF-8, some test may fail if not.

Versioning

The versioning scheme used is Semantic Versioning 2.0.0 with the Gradle Axion Release plugin that controls versions automatically based on git tags. If you ever face issues with the version or version tags are manually manipulated; the following command will clean up your local tags and fetch the remote tags again:

git tag -l | xargs git tag -d
git fetch --tags

prowide-core's People

Contributors

codacy-badger avatar creedox2010 avatar ecancrini avatar fernando-prowide avatar fernandodesarriera avatar jcampanello avatar lgtm-com[bot] avatar ptorres-prowide avatar spannm avatar zubri avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

prowide-core's Issues

Generic MT class to modify message contents

I want to update some basic tags like tag 20, 21, 22A, 72 in the different MT message say MT300, MT304, MT398. Instead of parsing the message using specific MT class and modifying using SwiftBlock4 is there any generic way to do this? Only these line of code is different for each message assume I already know the message type.

MT300 mt300 = MT300.parse(incoming_message);
MT304 mt304 = MT304.parse(incoming_message);
MT398 mt398 = MT398.parse(incoming_message);

Field98C - Parses to null value for value length < 8

Field98C skips populating the component for the value length < 8.
98C comprises of 2 components date and time and if the input value given is of length < 8, resulting value in component is null and this causes consuming component get empty vs provided input for further action.

I feel, this should be fixed to add another block of code
if (toparse.length() < 8) {
setComponent2(StringUtils.substring(toparse, 0, toparse.length));
}

public void parse(final String value) {
init(3);
setComponent1(SwiftParseUtils.getTokenFirst(value, ":", "//"));
String toparse = SwiftParseUtils.getTokenSecondLast(value, "//");
if (toparse != null) {
if (toparse.length() >= 8) {
setComponent2(StringUtils.substring(toparse, 0, 8));
}
if (toparse.length() > 8) {
setComponent3(StringUtils.substring(toparse, 8));
}
}
}

Special sequence _A in MT940/MT942 and like

Hi, I'm trying to build a hierarchical JSON representation of MT messages similar to what's documented on MTs Javadocs, but I've noticed an edge case that for some MT's like MT940/MT942 there exists a special sequence Sequence _A, which is document in the Javadocs, but does not have any accessors to retrieve it, like with other MTs, ie getSequenceAList(). Is there a specific reason for this, or would there be a possibility to add it?
https://github.com/prowide/prowide-core/blob/ff833efd7f6ada1b6ae0d62f610e882c9602c[…]erated/java/com/prowidesoftware/swift/model/mt/mt9xx/MT940.java https://github.com/prowide/prowide-core/blob/ff833efd7f6ada1b6ae0d62f610e882c9602c[…]erated/java/com/prowidesoftware/swift/model/mt/mt9xx/MT942.java

Issue with Austraclear payments

Hi,

Recently updated to 10.3, previously we were able to process payments MT198_027 from Austraclear (Australian clearing ) but after upgrade we are facing issue with parsing of 3 digit tags.
Payment sample :
{1:F01ZYXWAUFFFXXX5267848975}{2:O1981503161229ABCDAUFFFXXX51777922521612291503N}{3:{108:EEEEE0093090}}{4:
:20:GBM27E272BQ06
:12:027
:77E:
:21:270259BQ06
:905:NATA
:25:182-182-010091282
:32A:171122AUD259
:901:150254
:908:ACLR

:113:ADA
-}

Now Parsed tag 21 contains tag 905 similarly 32A has 901 and 908, which later results in processing failure.

Looking at Swiftparser.java --> tagStart() method it looks like we only support tags with no character options (dd) and tags with letter option (ddc).

Please assist.
thanks.

Message MT537 - Error reading Block B (STAT)

I have use library prowide version SRU2021-9.2.8 and i have a problem to read tag into block B (STAT).
This is a minimal example:
File MT537.txt
{1:...}{2:O537....}{3:{108:..}}{4:
:16R:GENL
:28E:5/LAST
:20C::SEME//000000000000251C
......
16S:GENL
16R:PENA
:16R:PENACUR
:16R:PENDET
:16R:RELTRAN
:16R:TRAN
:16R:STAT
:25D::IPRC//CPRC
:16R:REAS
:24B::CAND//CANI
:70D::REAS//XXXXX - Failure of the settlement
XXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXX
terparty
:16S:REAS
:16S:STAT
....

closing tag TRAN, REALTRAN, PENDET,PENACUR,PENA.

My code:
AbstractMT mt = AbstractMT.parse(new String("MT537.txt"));
List swfTagList = mt.getSequenceList("B"); // Sequence B is BLOCK STAT
/if i try to get the taglist with List swfTagList = mt.getSequenceList("B"); i get the ones of the seq "D1a1B1a" instead "/

Thanks for the support

Problem with IBAN / BBAN Validation

Hi,

A couple of days ago we encountered a weird issue where some IBAN/ BBAN are returned valid but other failed even though they were valid.
For example IBAN SC52BAHL01031234567890123456USD is a valid IBAN for Seychelles listed as sample on [https://www.iban.com/structure]

but when following is executed -

    IBAN iban = new IBAN("SC52BAHL01031234567890123456USD");
    iban.isValid();

it returns false.

during a quick debugging it looked like we are expecting the last char to be number in IbanValidationUtils.java
This issue is reproducible in both version we checked -

  1. pw-swift-core-SRU2018-7.10.3
  2. pw-swift-core-SRU2019-8.0.1

Please assist with this,
Thanks,

Parsing issue with MX message of type seev.031.002.09

Hi-
We are working to parse swift mx message of type seev.031.002.09
But, when we try to parse message using class MxSeev03100209 or AbstractMX or XMLParser parse method
we are getting exception and not able to parse xml data.
Attached is a file containing xml data we are working to parse.

Could you please assist on how to we can parse given xml data if possible could you send sample?

ABC_CANO CA ID 111111111.txt

Incorrect parsing of field 77E in MTn98

There seems to be a bug when parsing proprietary messages. Lines starting with a SWIFT tag inside the proprietary message are interpreted as their own fields rather than as part of field 77E. According to the SWIFT standard one should be allowed to use SWIFT tags inside field 77E.

With the following code I would expect fields 21 and 11S to be be inside field 77E, but they are interpreted at separate fields after 77E (see attached picture).

private static void parseMT298() throws IOException {
    String message = "{1:F01XXXXXXXXXXXX1746132598}{2:O2981817450530XXXXXXXXXXXX27490070701205301807N}{4:\r\n" +
            ":20:1708092\r\n" +
            ":12:550\r\n" +
            ":77E:\r\n" +
            ":21:FIELD21CONTENT\r\n" +
            ":11S:103\r\n" +
            "190528\r\n" +
            "-}{5:{TNG:}}";
    SwiftMessage swiftMessage = new SwiftParser(message).message();
    AbstractMT abstractMT = AbstractMT.create(swiftMessage.getTypeInt());
    abstractMT.setSwiftMessage(swiftMessage);

    MT298 mt298 = (MT298) abstractMT;
}

swift-prowide-bug

SRU2021 Updates

Hello,

I want to thank you for your effort in this project and I would like to know when SRU 2021 updates will be available for public users.

Thanks,

prowide-integrator-examples validator example

Hi,

We are looking to validate swift messages using validator.

when we try to initialize ValidationEngine, we are getting exception as follows.

Please suggest !!

Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Handler dispatch failed; nested exception is java.lang.NoClassDefFoundError: org/mozilla/javascript/Context] with root cause

Below is the code

ValidationEngine engine = new ValidationEngine();
engine.initialize();
String msg = messageRequestModel.getMessageBody();
List r = engine.validateMtMessage(msg);
System.out.println(ValidationProblem.printout(r));
engine.dispose();


build.gradle

repositories {
mavenCentral()
flatDir {
dirs 'C:\libs'
}
}

dependencies {
compile("org.springframework.boot:spring-boot-starter-web")
//compile group: 'com.prowidesoftware', name: 'pw-swift-core', version: 'SRU2020-9.1.2'
//compile group: 'com.prowidesoftware', name: 'pw-iso20022', version: 'SRU2020-9.1.5'

implementation name:  'pw-iso20022-SRU2020-9.1.7'
implementation  name: 'pw-swift-core-SRU2020-9.1.5'

implementation  name: 'pw-swift-integrator-CBPR-1.2u2'
implementation  name: 'pw-swift-integrator-data'
implementation  name: 'pw-swift-integrator-myformat-SRU2020-9.1.11'

implementation  name: 'pw-swift-integrator-SCORE-1.0.0'
implementation  name: 'pw-swift-integrator-sdk-SRU2020-9.1.14'
implementation  name: 'pw-swift-integrator-SEPA-2019v1.0u2'

implementation  name: 'pw-swift-integrator-SIC-4.6u2'
implementation  name: 'pw-swift-integrator-translations-SRU2020-9.1.17'
implementation  name: 'pw-swift-integrator-validation-SRU2020-9.1.16u1'

compile 'org.springframework.boot:spring-boot-starter-log4j2'

}

maven build issues

After quick sanity check of the pom.xml in the version SRU2016-7.8.5 I found the following issues:

1) The commons-lang dependency is in the runtime scope

<dependency>
    <groupId>commons-lang</groupId>
    <artifactId>commons-lang</artifactId>
    <version>2.6</version>
    <scope>runtime</scope>
</dependency>

As the result, "mvn clean install" build fails with 100 compilation errors
error: package org.apache.commons.lang does not exist

Recommendation: put "commons-lang" into compile scope.

2) The Rhino JS dependency is unused

<dependency>
  <groupId>rhino</groupId>
  <artifactId>js</artifactId>
  <version>1.7R2</version>
  <scope>runtime</scope>
</dependency>

it seems to be superfluous. After searching in source code I haven't found not a single case of usage of this library.

Recommendation: remove the dependency.

3) The module version in the git master branch is without SNAPSHOT suffix

Currently, the pom file in the master branch contains stable version "SRU2016-7.8.5". However, in the development branch one should always setup a SNAPSHOT version of the future release target. Please refer the official Maven user guide for details [1].

Recommendations:

  • in the master branch, setup a SNAPSHOT version of the next release target, e.g. "SRU2016-7.8.6-SNAPSHOT"
  • during the release process, make a git tag for stable version
  • use Maven Release plugin in order to automate the release procedure

[1] https://maven.apache.org/guides/getting-started/index.html#What_is_a_SNAPSHOT_version

Amount subfield of tag 61 in MT942 converted to int value

I'm not an swift message expert but I think that the amount subfield (component 5) of Tag 61 in MT942 message should have not been parse to Integer variable as it removes all the decimal values

public Field61 setComponent5(Number var1) {  
    if(var1 != null) {
        this.setComponent(5, "" + var1.intValue());
    }
    return this;
}

If I take a look at the tag 32A of the MT900 message , the static method SwiftFormatUtils.getNumber is used to format the amount as required.
I think the same format could be applied for the tag 61 of MT942 message

public Field32A setComponent3(Number var1) {
        this.setComponent(3, SwiftFormatUtils.getNumber(var1));
        return this;
}

Getting a field from an MT sequence that is also present in a subsequence

In MT548 optional Sequence B, there is an optional repeated field 95a Party, and in optional repetitive Subsequence B1 there is also a mandatory repeated field 95a Party.

If I first extract Sequence B from an MT548 instance using mt548.getSequenceB(), and then call sequenceB.getFieldsByNumber(95), I am returned all fields 95 from Sequence B—including those in every Subsequence B1.

What would the idiomatic way of getting just the fields 95 from strictly Sequence B? (I can reliably get the fields 95 from each B1 subsequence using MT548.getSubsequenceB1List(sequenceB) and calling sequenceB1.getFieldsByNumber(95) on each)

I'm currently working around this by using MT548.SequenceB.START_TAG and MT548.SequenceB1.START_TAG as subblock boundaries, but this doesn't seem ideal:

var strictSequenceB = sequenceB.getSubBlock(MT548.SequenceB.START_TAG, MT548.SequenceB1.START_TAG);

DTC is making few changes in XML path(add/update/delete) to some of the message types SR 2021.

DTC is making few changes in XML path(add/update/delete) to some of the message types SR 2021.

We are using below version for parsing DTC messages.
'com.prowidesoftware', name: 'pw-swift-core', version: 'SRU2020-9.1.2'
'com.prowidesoftware', name: 'pw-iso20022', version: 'SRU2020-9.1.5'

We would like to know if current library version we are using is going to work against the new changes?
Or we need to update to new version

Please suggest.

MT file in DOS PPC format not alligned to 512 sector size when message greater then 512 characters and not already multiple of 512 sector size

Method

com.prowidesoftware.swift.io.PPCWriter.write(final String msg, final Writer writer)
PPCWriter.java

calculates message padding incorrectly.

Instead of

int pad = length > 512? length % 512 : 512 - length;

it should be

int pad = (512 - (length % 512)) % 512;

Explanation:

In case when the message is smaller than 512 characters, padding is calculated correctly.
In case when the message is already multiple of 512 sector size, padding is calculated correctly too (0).
But, when the message exceeds 512 characters and is not multiple of 512, the padding is calculated as the DIV of message size and sector size which is wrong because it implies that the message is padded by the number of characters which message extends over predefined sector size and not by the number of characters required to extend message until the boundaries of partially occupied sector.

Example:
Message size 519 characters. Existing solution calculates padding as 519 % 512 which is 7. Following, message is padded by 7 EMPTY characters which implies that the message increases to 526 characters which is not multiple of 512, hence incorrect.

Proposed solution:
Calculate padding as difference between predefined sector size (512) and the DIV between actual message size and sector size. By this way, the padding represents the number of characters required to extend message until the boundaries of partially occupied sector.
Of course, this should be done only if message is not already alligned with sector boundaries.
On other side, padding can be calculated by the same way, regardless if the message is less then 512 characters or greater than 512 characters.

Example:

  1. Message size 414 characters. Padding is calculated as 512 - (414 % 512) which is 98.
    Following, message is padded by 98 EMPTY characters which implies that the message increases in size to 512 which is multiple of 512, hence correct.
  2. Message size 519 characters. Padding is calculated as 512 - (519 % 512) which is 505.
    Following, message is padded by 505 EMPTY characters which implies that the message increases in size to 1024 which is multiple of 512, hence correct.

Regards,

migrate test to Junit 5

Migrar los test a Judit 5 Jupiter.

No usar el org.junit.vintage de compatibilidad con Judit 4. La idea es cambiar los test para Judit 5, cambiando todos los annotation y lo que haga falta.

How to parse a Swift MT910 message without the header blocks

Hi,

I want to parse the swift message without the header blocks. It works fine with header blocks and does not work without them.

Working with block

fun main() {

    val msg = """
        {4:
       :20:SGP54321FFABCDE0
       :21:NONREF
       :25:SGACU 260090055178 VA-835000017001
       :32A:191031SGD15000,00
       :50K:/723211223344
       MICHAEL MAYBE
       :52A:OCBCSGSGXXX
       :72:/KREF/20191031OCBCSGSGBRT1234567
       //9812345//
       -}0000086250
   """.trimIndent()

    val parsedMessage: MT910 = MT910.parse(msg)

    val currency = Currency.valueOf(parsedMessage.field32A?.currency!!)
    val dateAsCalendar: Calendar = parsedMessage.field32A?.dateAsCalendar!!
    val tradeDate: LocalDate = dateAsCalendar.toLocalDate()

    println("Currency: $currency date: $tradeDate")

}

does not work without block 4

fun main() {

    val msg = """
       :20:SGP54321FFABCDE0
       :21:NONREF
       :25:SGACU 260090055178 VA-835000017001
       :32A:191031SGD15000,00
       :50K:/723211223344
       MICHAEL MAYBE
       :52A:OCBCSGSGXXX
       :72:/KREF/20191031OCBCSGSGBRT1234567
       //9812345//
   """.trimIndent()

    val parsedMessage: MT910 = MT910.parse(msg)

    val currency = Currency.valueOf(parsedMessage.field32A?.currency!!)
    val dateAsCalendar: Calendar = parsedMessage.field32A?.dateAsCalendar!!
    val tradeDate: LocalDate = dateAsCalendar.toLocalDate()

    println("Currency: $currency date: $tradeDate")

}

Problem with parsing Field59

For sample string passed to constructor of Field59

PL123
CO LTD
BUSINESS PARK,
ROAD,
OXFORD, UNITED KINGDOM

i got warning:

WARNING: component number 6 is out of bound for field 59

where field PARSER_PATTERN ="[/S$]S[$S]0-3"

MT094 - Block4 - parsing issue

Hi,

We're working on MT094 system messages. We're facing an issue while parsing block 4 of MT094 messages.

While parsing block4, the parser will only identify tags where the name is of 2 digits and may contain the optional trailing character. tag name pattern = nn[a]

For ex: if tag name is 20C, then the parser will be able to identify the tag, but if the tag name is 136 (which are of 3 digits) if will fail to identify the tags.

Consider following block4 from MT094 message:

{4:
:135:N
:136:S01234
:129:01/01
:130:/31/SWIFT NOTIFICATION
/01/GENERAL
SWIFT HEADQUARTERS
:312:Some message
-}

Parsing Result: ["135":"N\r\n:136:S01234\r\n:129:01/01.......\r\n:312:Some message"]

Here, the parser will identify the first tag of block4 which is 135. It'll be able to identify it as the identification logic for the first tag is different from the subsequent tag of block4.

To identify subsequent tags, the parser will look for tag names in the pattern nn[a] (2 digits with the optional trailing character).

But the tag names of MT094 are of 3 digits due to which the parser is not able to identify subsequent tags.

Reference: SwiftParser.java -> isTagStart()

Note: No issues with the input message format related to CRLF.

Thanks.

Bad performance of textTagEndBlock4 in SwiftParser

Since version SRU2016-7.8.5 there is a performance problem in the implementation of textTagEndBlock4 in SwiftParser. Processing increased from 3 seconds to 3 minutes for 14MB file. Profiling tools show, that most time is spent in substring method. We internally reverted implementation to SRU2015-7.7 and it fixed issue.

How can i de-duplication transaction from MT940 &MT942

Hi
Recently, I use this libarary to query SWIFT data. it's a very excellent library. Thank you for your contribution.
However,I found duplication transaction in MT940 &MT942,I don't konw about MT940 &MT942 very well. so can you help me how can de-duplication transaction? which tag I can use?

JPMS support

It would be nice to have the library support the Java Platform Module System (JPMS).
We would like to use com.prowidesoftware:pw-swift-core with Java 17.
A good solution is to provide a multi-release jar.
Please let me know if I can/should contribute.

Thanks!
Markus

Support for Multiline data for Fields 50F and 59F

Hello Team
Need your guidance. How do we use the parser to extract for multiple data for fields 50F and 59F. Such as

50F:/XYZ...
1/ABCEEHFHHF
1/ABDHDJDJDJ

Can we extract data from both the lines starting with '1/' under 50F (the same applies for 59F). Does the parser supports it and how should we use it , can you please guide us to a sample for such extraction.

Thanks

Possible regression in getDescription()/getNarrative()

Hi,

the change which introduces the feature to pass a delimiter to the getNarrative/getDescription methods breaks old code that relay on receiving the concatenated text with SWIFT_EOL as delimiter.

I noticed the issue in Field35B. When calling field35.getDescription(), the text is concatenated without any delimiter, because getDescription() calls getDescription(null).

To stay compatible with older code it would be great to change the call in getDescription() to getDescription(SWIFT_EOL).
If someone needs another delimiter he/she should use getDescription(delimiter) instead of the no-args version.

Problem by parsing from txt

I want to parse some txt SWIFT Messages into my projekt.
First of all i used some of your examples and then i switched to my own generated swift messages.
I noticed a problem by parsing some 1xx, 2xx,5xx and 9xx SWIFT messages.

AbstractMT msg = AbstractMT.parse(new File("example_messages/MT509.txt"));		
System.out.println(msg.message()); // No problem			
System.out.println(msg.getMessageType()); // Returns null

I attached the files to this issue report.

You can recheck my messages with this website: http://www.paymentcomponents.com/demo/mt/submit

MT101.txt
MT103.txt
MT104.txt
MT202.txt
MT509.txt
MT905.txt

Reading MT940 Rabobank results in NULL without errors

I am researching which MT940 parser is able to import dutch bank MT940 formats. So far I found that , even though all banks claim to export in MT940, the results vary and thus the import results vary greatly as well.

Prowide-core seems to be the most comprehensive suite, but so far no luck importing RaboBank MT940 exports.

I have taken a look at the example java files, and came up with this to try to import an MT940 example file I have:

String content = readFileFromResources("MT940_A_20190220_104935.swi", Mt940Parser.class);
		
// try SwiftParser
SwiftParser swiftParser = new SwiftParser(content);		
swiftParser.message();
List<String> errors = swiftParser.getErrors();
System.out.println(errors);

SwiftMessage sm = SwiftMessage.parse(content);
		
if (sm.isServiceMessage()) {
	sm = SwiftMessage.parse(sm.getUnparsedTexts().getAsFINString());
}
		
System.out.println(sm.getTypeInt()); // prints -1
System.out.println(sm.getServiceTypeIdentifier()); // prints null
System.out.println(sm.getBlockCount()); // prints 0
System.out.println(sm.getCategory()); // prints null
		
// Fails:
Assert.assertTrue(sm.isType(940));

The content variable is a String of the file contents. I tried several ways (including using InputStream etc and directly calling Mt940.parse()).

Executing the above code results in:

  • no errors being printed
  • sm is of no type (ie, the assertion failed, but)

Raw output:

Reading file from resources : MT940_A_20190220_104935.swi
[]
sep 28, 2020 3:26:34 PM com.prowidesoftware.swift.model.SwiftMessage getTypeInt
WARNING: Error converting type to int null
-1
null
0
null
sep 28, 2020 3:26:34 PM com.prowidesoftware.swift.model.SwiftMessage getTypeInt
WARNING: Error converting type to int null

Here is the very start of the MT940 being imported, including first :61: tag.

:940:
:20:940S190212
:25:NL27RABO1234567890 EUR
:28C:19030
:60F:C190211EUR000000246311,62
:61:190211C000000000157,30N541NONREF
NL27RABO1234567890
:86:/TRCD/541/ORDP//NAME/Mr Foo/REMI/201134296/ISDT/2019-02-11
:61:190212C000000000272,25N541NONREF

I don't see any starts or ending of blocks. Not sure why, but I get the impression the Rabobank does not export it as such. Their MT940 description tells me that

On the other hand, I can't imagine this is the first time someone tried to import a Rabobank MT940 file, so I guess I do something wrong?

NOTE: I also tried the exact same test code with a MT940 from Knab (other bank), and it works fine.

Incorrect parsing of Field 48

Given this tag48 value:

48: 30/BUT WITHIN L/C VALIDITY

Prowide generates the following components values:

component 1: 30
component 2: BUT WITHIN L

which results when calling field.getValue() to get truncated value : 30/BUT WITHIN L

Could you please verify this issue?

Thanks,

MX Xml Parsing taking too much time

Hi,
We are working to parse swift MX message of type seev.031.002.09
When we are calling the below function. It is taking 300ms to 600 ms for parsing different XML messages.
MxSeev03100209 mx = MxSeev03100209.parse(xmlMessage);

[INFO ] 2021-04-21 21:46:01,612 Parser.mxParse() -Parsing started
[INFO ] 2021-04-21 21:46:02,010 Parser.mxParse() -Parsing end

I attached sample XML messages for which it is taking this much time. Please check why it's taking so much time as we have to process thousands of messages in a single day ad it's taking hours to process.

MX_Sample_Xml_2.txt
MX_Sample_xml_1.txt

MT 700 TAG 49G cannot insert null value

Hi, has anyone had this problem? Tried to insert null/empty string into tag49G as below

Field49G field49G = new Field49G(); values = new ArrayList<>(); narrative = f.getTag49G() != null ? f.getTag49G().split("\n") : null; if(narrative != null){ values.addAll(Arrays.asList(narrative)): } if(values.size() != 0){ field49G.setNarrative(values.toString()); } else { field49G.setNarrative(""); } fieldList.add(field49G);

and it returned NoSuchMethodError. What is happening?

Mind you i used the above code for Tag49H and it allows nulls. Both 49G and 49H values are null, but only 49H works.

SwiftTagListBlock.indexOfAnyFirstAfterIndex() - off by one

The JavaDoc comment for this method says: "Gets the index of the first tag matching any of the given names after the given index in the tag list".

This is not correct. The tag at the given index is taken into account.

Version: SRU2020-9.1.4

Tag 59 is missing '/' in JSON output

when I try to convert a swift MT103 message to JSON, the tag 59 in the output comes back without '/'. Is there a reason why this slash is omitted?

IBAN validation is broken for Austrian Iban

When validating following austrian iban

AT32 0100 0000 0173 363

by using new IBAN("AT32 0100 0000 0173 363").isValid() true is returned. Although iban is not valid. Its length of 19 characters is too short. All Austrian ibans must have a length of 20 characters.

Upgrade from 7.3 to 7.10.3 - Field87C disappeared - How to generate it?

Hi there,

We're currently using Prowide Core (WIFE) 7.5 and want to upgrade to version 7.10.3 (latest release). While working on this, I've recognized that a field that we use for message generation (class Field87C) is no longer existent in the latest release. Is there a possibility that I still can generate this field and send it in a SWIFT message generated by Prowide Core?

First, I thought it would be possible using

public static Field getField(java.lang.String name, java.lang.String value)

But the fact that this method returns a specialized instance of Field class is not really helpful, as Field87C is no more existent.

Any idea on how I could solve my problem?

Best regards,
André

getting field label for tag component

Hi!

Say I have a tag e.g. ":20C::SEME//B0QT080624-00242" and would like to get its localized label for the qualifier component (in this case "Sender's Message Reference").

What would be the best way to do this programmatically?

I tried appending the qualifier to the field name, that is Field.getLabel("20c_SEME", "515", "A", Locale.US) with no success. I guess it's because Field.getNumber() truncates the "_SEME" part. If I change the first parameter to "20a_SEME" it works, but my field in this case is 20c.

Thanks for any help.

Fabio

MT to JSON conversion?

In the documentation it states that MT-JSON Conversion is back and forth.

Is it possible to parse a JSON structure into a MT message with your library?

Tried to find some documentation/examples but failed…

Pls advice

Thx for a great API

M

License Question

Hello,
I am interested in using your library to enable Apache Drill to query SWIFT data, and I would like to submit it to the code base. I was wondering if you would consider releasing a version using either the Apache license or another open source license that is compatible with the Apache license.
Thanks!

[wife:bugs] #83 SwiftTagListBlock removeSubBlock not work correctly

I have 2 subblocks SUBBAL:

List<SwiftTagListBlock> subbals =sequenceB1.getSubBlocks(SchemeConstantsS.SUBBAL);

for(int x = 1; x < subbals.size(); x++) {
    sequenceB1 = sequenceB1.removeSubBlock(SchemeConstantsS.SUBBAL);    
  }

and the firt removeSubBlock , remove the firt subblock and the 16S of the second.

MT564 Issue with sequence getFieldsByName()

Hi-

We are working on MT564 parsing. we are facing an issue while parsing sequence E (Corporate action option) and E2(Cash movement). when we call getFieldsByName() with 92 field (A,B,F,H,J,K,R,M).

Issue is: If this field(92) is present in cash movement sequence only
then it is being parsed in sequence E and also in sequence E2 both.
actually it should be parsed in E2 sequence only when it is present E2 sequence of MT564.

Please find below attached MT564 msg which we are trying to parse but :92J::GRSS//INCO/USD0,1234567/ACTU
is parsed in both sequence E and sequence E2.

We are using release- SRU2018-7.10.4

MT564.txt

SwiftMessage to Text Conversion

Hi!

While upgrading from 7.5 to 7.10.3, I've noticed a difference in generation of line breaks, when converting the SwiftMessage to a text representation. It seems as if \n has been replaced by \r\n.
Can you confirm this? I've checked the release logs but did not find anything clearly related to this.

I use the ConversionService.getFIN(SwiftMessage) method to convert the SwiftMessage into a textual representation. Is that the recommended approach?

Thanks for any help.

Best regards,
André

MT parser does not split a multiline field into components with last version SRU2020-9.1.2

Hello there,

Having the following field70 inside a String mt103 fin message:

":70:/ROC/E2EId1232341\n" +
"/RFB/Remittance information\n" +

After parsing into a MT103 object, the field does not have different components but it have different lines. Also, function getValueByCodeword retrieves concatenated lines instead desired line value.

Version
I'm facing this issue with last version SRU2020-9.1.2 (working as expceted with SRU2019-8.0.1).

How to reproduce
Given a fin message with a field splitted in different lines like previous:
MT103.parse(givenMT103Message).getField70().getValueByCodeword("ROC") should be E2EId1232341 but it is E2EId1232341\n/RFB/Remittance information.
Also MT103.parse(givenMT103Message).getField70().getComponents().size() should be 2 (or pre-size of 4) but it is 1.

Note: getLines function works as expected. (even having components arraylist initialized with a pre-size of 4)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.