写一个简单的ofx4j程序

时间:2010-07-04 23:22:25

标签: java

我一直在使用http://ofx4j.sourceforge.net/userguide.html作为指导,编写一个小型java程序,从fargo井下载我的银行帐户对帐单。我一直收到一条错误消息,指出无效登录。我有正确的网址。我使用与用于登录其网页时相同的密码和用户名。有没有人可以查看或使用任何其他简单的样品?

1 个答案:

答案 0 :(得分:0)

我遇到了同样的问题。 我试图登录大通银行,但我得到一个无效的登录。 我遇到的问题是我使用的是错误的数据,oxf4j可能有过时的数据 存储在它存储的银行中。 转到gnucash,为您的银行获取正确的更新设置: http://wiki.gnucash.org/wiki/OFX_Direct_Connect_Bank_Settings。 然后,您需要创建一个新的BaseFinancialInstitutionData对象 像这样(这个例子是追逐信用卡):

BaseFinancialInstitutionData data =  new BaseFinancialInstitutionData();
data.setFinancialInstitutionId("10898");
data.setOFXURL(new URL("https://ofx.chase.com"));
data.setOrganization("B1");
FinancialInstitutionService service = new FinancialInstitutionServiceImpl();
FinancialInstitution fi = service.getFinancialInstitution(data);