stoicflame / ofx4j

Apache License 2.0
74 stars 50 forks source link

Touble using ofx4j inside a web app #74

Open atilacamurca opened 2 weeks ago

atilacamurca commented 2 weeks ago

Hi,

I'm trying to use ofx4j inside a web app, here's an example:

https://github.com/atilacamurca/ofx-web-example

Java version:

java version "1.8.0_301"
Java(TM) SE Runtime Environment (build 1.8.0_301-b09)
Java HotSpot(TM) 64-Bit Server VM (build 25.301-b09, mixed mode)

Wildfly version: 21.0.2-Final

When I send an .ofx file, the file is not parsed correctly and I only got this on the console:

2024-08-23 17:30:08,167 INFO  [com.webcohesion.ofx4j.io.BaseOFXReader] (default task-1) Processing OFX 1 headers...
2024-08-23 17:30:08,172 INFO  [com.webcohesion.ofx4j.io.AggregateStackContentHandler] (default task-1) Child aggregate SIGNONMSGSRSV1 is not supported on aggregate OFX (class com.webcohesion.ofx4j.domain.data.ResponseEnvelope): name not assigned a type.
2024-08-23 17:30:08,175 INFO  [com.webcohesion.ofx4j.io.AggregateStackContentHandler] (default task-1) Child aggregate BANKMSGSRSV1 is not supported on aggregate OFX (class com.webcohesion.ofx4j.domain.data.ResponseEnvelope): name not assigned a type.

But, when I copy the same files (Java Classes) that parse the .ofx file to my app, the file is parsed correctly as shown in this Pull Request:

https://github.com/atilacamurca/ofx-web-example/pull/1

Are there any known reasons for why this happens?

Thanks in advance.

stoicflame commented 2 weeks ago

Perhaps an encoding issue? Or dependency management problem? Can you confirm you're on the latest version?

atilacamurca commented 2 weeks ago

Yes, I can confirm.

https://github.com/atilacamurca/ofx-web-example/blob/master/pom.xml#L21-L25

<dependency>
    <groupId>com.webcohesion.ofx4j</groupId>
    <artifactId>ofx4j</artifactId>
    <version>1.37</version>
</dependency>