Error when testing iDEAL Zelfbouw

1
I am trying to get iDEAL Zelfbouw (ABNAMRO) to work. When I run the test against the ABNAMRO test environment I get the following error. Debugging the code seems to indicate that the XML is received nicely. But it seems that somehow a socket is closed prematurely or that the XML does not have the right format. The stacktrace: com.mendix.core.CoreException: Exception occurred in action 'Microflow [iDEAL.DoIssuerRequest]', all database changes executed by this action were rolled back at com.mendix.core.actionmanagement.CoreAction.d(SourceFile:553) Caused by: com.mendix.core.CoreException: Exception occurred in microflow 'iDEAL.DoIssuerRequest' for activity 'Call 'SSLRequest'', all database changes executed by this microflow were rolled back at kT.b(SourceFile:252) Caused by: com.mendix.core.CoreException: Fault reading the XML information from the server at ideal.actions.SSLRequest.executeAction(SSLRequest.java:190) Caused by: java.net.SocketException: Connection reset at java.net.SocketInputStream.read(SocketInputStream.java:168) at com.sun.net.ssl.internal.ssl.InputRecord.readFully(InputRecord.java:293) at com.sun.net.ssl.internal.ssl.InputRecord.read(InputRecord.java:331) The XML: <DirectoryRes version="1.1.0" > <createDateTimeStamp>2011-09-13T13:08:12.609Z</createDateTimeStamp> <Acquirer> <acquirerID>9611</acquirerID> </Acquirer> <Directory> <directoryDateTimeStamp>2011-09-13T13:08:12.609Z</directoryDateTimeStamp> <Issuer> <issuerID>0031</issuerID> <issuerName>ABN AMRO</issuerName> <issuerList>Short</issuerList> </Issuer> <Issuer> <issuerID>1001</issuerID> <issuerName>ABN Amro Bank</issuerName> <issuerList>Short</issuerList> </Issuer> <Issuer> <issuerID>1002</issuerID> <issuerName>Fortis Bank</issuerName> <issuerList>Short</issuerList> </Issuer> <Issuer> <issuerID>1003</issuerID> <issuerName>ING Bank</issuerName> <issuerList>Short</issuerList> </Issuer> <Issuer> <issuerID>1004</issuerID> <issuerName>Postbank</issuerName> <issuerList>Short</issuerList> </Issuer> <Issuer> <issuerID>1005</issuerID> <issuerName>Rabobank</issuerName> <issuerList>Short</issuerList> </Issuer> <Issuer> <issuerID>1006</issuerID> <issuerName>SNS Bank</issuerName> <issuerList>Short</issuerList> </Issuer> <Issuer> <issuerID>2001</issuerID> <issuerName>ASN Bank</issuerName> <issuerList>Long</issuerList> </Issuer> <Issuer> <issuerID>2002</issuerID> <issuerName>ASR Bank</issuerName> <issuerList>Long</issuerList> </Issuer> <Issuer> <issuerID>2003</issuerID> <issuerName>Banco do brasil</issuerName> <issuerList>Long</issuerList> </Issuer> </Directory> I don't know what is going wrong exactly and don't know how to further debug this. Any help appreciated. ADDITIONAL INFO: I have pinned it down to the following issue: In the SSLRequest the following code exists: BufferedReader in = new BufferedReader(new InputStreamReader(socket.getInputStream(), "UTF8")); String inputLine; boolean containXML = false; while ((inputLine = in.readLine()) != null) { The issue is that the response does not close with a linebreak. The last line is </directoryres>. Because of that this line is not read and the response is not closed correctly resulting in invalid XML. So the question now is: How can I convert the bufferedreader to valid XML?
asked
2 answers
1

Reading input streams should not be done manually. Way too error prone. Just use:

org.apache.commons.io.IOUtils.toString(socket.getInputStream(), "UTF8")

or something similar.

answered
0

Wich changes has there been made to the source code for I see the version is 2.5.6, but the module is build for 2.5.0-RC1?

answered