> BankGW = Bank Gateway
> VDCGW = VDC Gateway
> VDCClient = VDC Client
> 1. VDCClient sends 1311 ISOMsgs to VDCGW
> 2. VDCGW sends these 1311 ISOMsgs to BankGW
> 3. BankGW responses 1310 ISOMsgs back to VDCGW
> 4. VDCGW responses these 1310 ISOMsgs back to VDCClient
>
> I coded for the PGW.
> Steps 1 and 2 are successful but I don't receive response messages.
I feel it might be a bit early to claim success based upon a send...
...What does the Bank have to say about your passed on request message?
If they didn't respond, it is likely they didn't like the request
(structurally) enough to even give back a rejection response code.
Do the Bank have any form of sign-on message to identify you or to
set-up keys for later messages? If so, have these been exchanged correctly?
--
Mark
If you read through this thread, you will find my illustrative code was
flawed and that jpos-EE provided a much slicker solution.
Once this was discovered, I deleted the source from the files section
banishing them to the deepest depths of my trash, never to surface again.
I don't have this code any more, sorry.
--
Mark
On glancing through your code it seems very confused. May I suggest you
take a copy of each source file,go through it, removing all of the
commented out code.
I think your problem might be a very simple one...
Can you change the form of your String comparison from :-
if (mti == "1300")...
into :-
if (mti.equals("1300")) ...
Although if this theory is correct, the message "Unknown MTI" should be
appearing in the log.
Also can you add the line:-
Logger.log(new LogEvent(this, "BankDispatcher", "Processing"));
as the first line in the BankDispatcher.java process(ISOSource source,
ISOMsg m) method. Just to check we are getting there.
--
Mark
Steps 1 to 4 are successful.
Now I want to insert transactions information (step 3) into database:
After BankGW sends back to VDCGW, it has to insert fields' ISOMsg into
OracleDB (ex. BankMSG).
> Steps 1 to 4 are successful.
Fantastic, what did you change to get it working, anything you can
share here?
> Now I want to insert transactions information (step 3) into database:
> After BankGW sends back to VDCGW, it has to insert fields' ISOMsg into
> OracleDB (ex. BankMSG).
Be careful what data you save from the messages. There are strict
rules around any storage transaction specific data.
Don't save anything specific to the Card and you might be ok.
What specifically do you need help in achieving?
--
Mark
Mark Salter viết:
> ThanhNS wrote:
>
> > Steps 1 to 4 are successful.
> Fantastic, what did you change to get it working, anything you can
> share here?
>
Fantastic? In BankDispatcher I add code piece following:
GWServer = BankGateway.GWServer;
channel = GWServer.getLastConnectedISOChannel();
channel.send(m);
In VDCDispatcher I add code piece following:
ISORequest r = new ISORequest(m);
VDCGateway.gwMux.queue(r);
ISOMsg response = r.getResponse(timeout);
if (response != null)
source.send(response);
> > Now I want to insert transactions information (step 3) into database:
> > After BankGW sends back to VDCGW, it has to insert fields' ISOMsg into
> > OracleDB (ex. BankMSG).
> Be careful what data you save from the messages. There are strict
> rules around any storage transaction specific data.
>
> Don't save anything specific to the Card and you might be ok.
>
> What specifically do you need help in achieving?
>
> --
> Mark
Example, response 1310 has fields: MTI, processingcode,
datetime_transaction, trace_audit_number, datetime_local_transaction,
functioncode, acquiring_institution_id_code,
forwarding_institution_id_code, panextend.
I want to insert these fields into BankMSG table(msgid, MTI,
processingcode, datetime_transaction, trace_audit_number,
datetime_local_transaction, functioncode,
acquiring_institution_id_code, forwarding_institution_id_code,
panextend).
In BankDispatcher I add code piece following:
GWServer = BankGateway.GWServer;
channel = GWServer.getLastConnectedISOChannel();
channel.send(m);
FormatMsg.insertBankMsg(m);
But in BankMsg table, number of messages is less than number of sent
back messages.
Can you suggest me?
Thank you very much.
It is hard to guess...
... but you need to determine which messages are missing to start the
investigation in why your expected numbers do not match the actual.
What key are you using for each record, could you be getting records be
overwritten?
Can your insertBankMsg(m) method fail, and if it does does it let you
know?
Are you seeing (logging something) if any Exceptions are being thrown?
--
Mark
ThanhNS wrote:
> Dear Mark.
> I wrote a class (FormatMag) to help me formating messages from,
> inserting messages into database. In this class, I have a method
> *insertBankMsg(ISOMsg m)* to insert message m into DB.
>
> In BankDispatcher I add code piece following:
> GWServer = BankGateway.GWServer ;
> channel = GWServer.getLastConnectedISOChannel();
> channel.send(m);
> FormatMsg.insertBankMsg(m);
>
> But in BankMsg table, number of messages is less than number of sent
> back messages.
> Can you suggest me?
It is hard to guess...
... but you need to determine which messages are missing to start the
investigation in why your expected numbers do not match the actual.
What key are you using for each record, could you be getting records be
overwritten?
Can your insertBankMsg(m) method fail, and if it does does it let you
know?
Are you seeing (logging something) if any Exceptions are being thrown?
--
Mark
System.out.println("ISOException caught...");
ex.printStackTrace(System.out);
> } catch (SQLException ex) {
> /** @todo Handle this exception */
System.out.println("ISOException caught...");
ex.printStackTrace(System.out);
> }
> }
>
Exceptions could be being thrown, your code is silently absorbing any
that do occur.
Add a call to logging or as a quick fix, write a message to System.out
within each of your catch sections.
--
Mark
> cstmt.setInt (2, Integer.parseInt(processingcode));
at
oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:111)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:330)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:287)
at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:742)
at
oracle.jdbc.driver.T4CCallableStatement.doOall8(T4CCallableStatement.java:211)
at
oracle.jdbc.driver.T4CCallableStatement.executeForRows(T4CCallableStatement.java:950)
at
oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1159)
at
oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3284)
at
oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:3367)
at
oracle.jdbc.driver.OracleCallableStatement.executeUpdate(OracleCallableStatement.java:4244)
at
com.vss1.ebillgateway.bank.FormatMsg.insertBankMsg(FormatMsg.java:484)
=====> cstmt.executeUpdate();
at
com.vss1.ebillgateway.BankDispatcher.process(BankDispatcher.java:116)
=====> formatMsg.insertBankMsg(m);
at org.jpos.iso.ISOServer$Session.run(ISOServer.java:126)
at org.jpos.util.ThreadPool$PooledThread.run(ThreadPool.java:100)
-------------------------------------------------------
I always received 299 inserted messages.