Topic: Testing New Applications

I'm trying to get an open-source OFX library up for Java, and running into some problems.  I'm only attempting to ask for the FI profile, but a lot of institutions just return an empty 400 to me and some seem to respond as expected.

So, my question is, how do you go about testing your applications?  How do you validate the OFX server?  I assume that you don't have an account number/password for every institution in the directory, so what does the "Last Validated" mean?

Any tips on discovering what I'm doing wrong?  Here's an example profile request:

OFXHEADER:100
DATA:OFXSGML
VERSION:102
SECURITY:NONE
ENCODING:UNICODE
CHARSET:UTF-8
COMPRESSION:NONE
OLDFILEUID:NONE
NEWFILEUID:e34fb57d-8857-4486-9e7c-6842b723a8d4

<OFX>
<SIGNONMSGSRQV1>
<SONRQ>
<DTCLIENT>20080709195138.077
<USERID>anonymous00000000000000000000000
<USERPASS>anonymous00000000000000000000000
<LANGUAGE>ENG
<APPID>TESTAPP
<APPVER>0100
</SONRQ>
</SIGNONMSGSRQV1>
<PROFMSGSRQV1>
<PROFTRNRQ>
<TRNUID>2971dac3-6e53-4d31-9e6a-8a8fe9ca2716
<PROFRQ>
<CLIENTROUTING>NONE
<DTPROFUP>19700101000000.000
</PROFRQ>
</PROFTRNRQ>
</PROFMSGSRQV1>
</OFX>

Re: Testing New Applications

Some more follow-up on this.  There were a few things I did that seemed to be more acceptable for more institutions:

1. I wasn't adding the full CRLF for the new lines.  I was just sending the LF since I'm on Linux.
2. I wasn't using "USASCII" and "1252" for the OFX headers "ENCODING" and "CHARSET".  I was trying to use UTF-8 encoding.  Silly me.

I still don't have everything working for all institutionsThe ones it does NOT work for are the applications that are hosted by MS IIS and they all have their endpoint URLs pointing to some cgi script names "isaofx.dll".  Still haven't figure out what's the problem with these OFX servers. If anyone can give me any more pointer, I'd GREATLY appreciate it.

Re: Testing New Applications

More follow up.  Disappointing that nobody is monitoring this thread.  Anyway...

The problem I was having with the isaofx.dll endpoints was that I wasn't sending the FID in the request.  Working much better now.

Re: Testing New Applications

I too am sorry not to get back to you earlier.  But I am glad that you got it working.

Re: Testing New Applications

I too am sorry not to get back to you earlier.  But I am glad that you got it working.

6 (edited by BenW 2011-05-03 12:26:41)

Re: Testing New Applications

I tried to follow stoicflame's code and notes, but I am not having any success getting a Profile response.  I tried several different banks, but I am just getting 500 errors back.  Does anybody have any idea what might be wrong with my code, which is in VB.net?

        Dim OFXurl As String = "https://www.oasis.cfree.com/1401.ofxgp"
        Dim Org As String = "US Bank"
        Dim FID As String = "1401"
        Dim userID As String = "anonymous00000000000000000000000"
        Dim password As String = "anonymous00000000000000000000000"
        Dim DataBuffer As New StringBuilder

        DataBuffer.AppendLine("OFXHEADER:100")
        DataBuffer.AppendLine("DATA:OFXSGML")
        DataBuffer.AppendLine("VERSION:102")
        DataBuffer.AppendLine("SECURITY:NONE")
        DataBuffer.AppendLine("ENCODING:USASCII")
        DataBuffer.AppendLine("CHARSET:1252")
        DataBuffer.AppendLine("COMPRESSION:NONE")
        DataBuffer.AppendLine("OLDFILEUID:NONE")
        DataBuffer.AppendLine("NEWFILEUID:NONE")
        DataBuffer.AppendLine()
        DataBuffer.AppendLine("<OFX>")
        DataBuffer.AppendLine("<SIGNONMSGSRQV1>")
        DataBuffer.AppendLine("<SONRQ>")
        DataBuffer.AppendLine("<DTCLIENT>" & Format(DateTime.Now, "yyyyMMddHHmmss"))
        DataBuffer.AppendLine("<USERID>" & userID)
        DataBuffer.AppendLine("<USERPASS>" & password)
        DataBuffer.AppendLine("<LANGUAGE>ENG")
        DataBuffer.AppendLine("<FI>")
        DataBuffer.AppendLine("<ORG>" & Org)
        DataBuffer.AppendLine("<FID>" & FID)
        DataBuffer.AppendLine("</FI>")
        DataBuffer.AppendLine("<APPID>QWIN")
        DataBuffer.AppendLine("<APPVER>0900")
        DataBuffer.AppendLine("</SONRQ>")
        DataBuffer.AppendLine("</SIGNONMSGSRQV1>")
        DataBuffer.AppendLine("<PROFMSGSRQV1>")
        DataBuffer.AppendLine("<PROFTRNRQ>")
        DataBuffer.AppendLine("<TRNUID>10001")
        DataBuffer.AppendLine("<PROFRQ>")
        DataBuffer.AppendLine("<CLIENTROUTING>NONE")
        DataBuffer.AppendLine("<DTPROFUP>19600101120000")
        DataBuffer.AppendLine("</PROFRQ>")
        DataBuffer.AppendLine("</PROFTRNRQ>")
        DataBuffer.AppendLine("</PROFMSGSRQV1>")
        DataBuffer.AppendLine("</OFX>")

        Dim byteBuffer() As Byte = Encoding.ASCII.GetBytes(DataBuffer.ToString)

        Dim objReq As HttpWebRequest = WebRequest.Create(OFXurl)
        objReq.Method = "POST"
        objReq.ContentType = "application/x-ofx"
        objReq.Accept = "*/*, application/x-ofx"
        objReq.ContentLength = byteBuffer.Length
        System.Net.ServicePointManager.Expect100Continue = False
        Dim ReqStream As Stream = objReq.GetRequestStream
        ReqStream.Write(byteBuffer, 0, byteBuffer.Length)
        ReqStream.Close()
        Dim objResponse As HttpWebResponse = objReq.GetResponse

        Dim ResponseStream As Stream = objResponse.GetResponseStream
        Dim responseReader As StreamReader = New StreamReader(ResponseStream)
        Dim ResponseString As String = responseReader.ReadToEnd