--
--
jPOS is licensed under AGPL - free for community usage for your open-source project. Licenses are also available for commercial usage.
Please support jPOS, contact: sa...@jpos.org
You received this message because you are subscribed to the "jPOS Users" group.
Please see http://jpos.org/wiki/JPOS_Mailing_List_Readme_first
To post to this group, send email to jpos-...@googlegroups.com
To unsubscribe, send email to jpos-users+...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/jpos-users
---
You received this message because you are subscribed to the Google Groups "jPOS Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jpos-users+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
many Thanks your solution working , But i have one issue ?
If i add debug point in (SendTestMessage.java) then only its sending the message to client , otherwise its not sending , if i run my project without debug point?
I created two Net beans project, like
ServerSimulator (project 1)
------------------------------------
Deploy
-- 10_server
-- 20_qserver_mux
-- 52_sendmessage
Src
-- MyRequestListener.java
-- SendTestMessage.java
-- startup.java
ClientSimulator (project 2)
-----------------------------------
Deploy
-- 23_clientsimulator_channel
-- 20_clientsimulator_mux
Src
-- ISOListener.java
-- TestStartup.java
To run my project i used the following code.
---------- Startup.java-------------
import org.jpos.q2.Q2;
public class startup {
public static void main(String[] args){
Q2 q2 = new Q2 ();
q2.run();
}
}
-----------------------------------------
is this correct way ?
Really thanks for you , i know i am disturbing u like anything . but i am really sorry for that .. and thanks a lot ...
Suggestion Needed ?
From A-Server using MUX of B-Server sent msg to issuer.
--
qmux.isConnected()
So when I want to send a message to atm x, I know its IP and call that mux to send the message. The qserver
need a modification to derive the channel name from the key name and get that channel to send the message.
NAT related issues there where many ATMs could appear to come from the same IP. I prefer the high level logon approach ...
The NAT releated issue sounds similar to all ATMs connecting to a single hardware box and all traffic appears to come from a single IP (usualy a case when they are dialup atms and box does a protocol conversion), in this case differentiating of atms needs to be done based on ip + local port being used for the connection.
In this situation the toString()
method in BaseChannel would give you a good key, because it includes the source IP and port as well as the destination.
Logons would work but ATMs, at least the ones i have worked with previously dont do logons.
I'm not following this thread very closely, but I don't understand why you would initiate messages to the ATM, you usually provide responses, and you have the ISOSource available in the request listener.
This is working code. If you can get it to work , excellent, if not there is nothing else I can do to help here.
This code basically uses the mux configured in the server to send a message to a client connected to it. I used netcat as a client that connected to port 23000.
The mux request sends the message to the client and its visible in the client
http://screencast.com/t/V0zEZSXA
Its unfortunate that you need so much of spoon feeding. All this has been covered an explained in the threads.
I have used jpos 1.8.7 and java 7 for running this.
////////////////////
//Server Deploy File
<!--File Name 10_server.xml -->
<?xml version="1.0" ?>
<server name="server-1" class="org.jpos.q2.iso.QServer" logger="Q2">
<attr name="port" type="java.lang.Integer">8888</attr>
<channel name="channel.1"
class="org.jpos.iso.channel.NACChannel"
packager="org.jpos.iso.packager.GenericPackager" logger="Q2">
<property name="packager-config" value="cfg/iso87ascii.xml" />
</channel>
<request-listener class="a.b.MyRequestListener" logger="Q2" realm="incoming-request-listener">
</request-listener>
<in>NETWORK_IN</in>
<out>NETWORK_OUT</out>
</server>
////////////////////
<!--File name : 20_qserver_mux.xml-->
<?xml version="1.0" ?>
<mux class="org.jpos.q2.iso.QMUX" logger="Q2" name="qserver-mux">
<in>NETWORK_OUT</in>
<out>NETWORK_IN</out>
<key>11</key>
<unhandled>unhandled</unhandled>
</mux>
---------------------
<!-- Bean deploy file, file name 52_sendmessage.xml-->
<test class="a.b.SendTestMessage" logger="Q2">
</test>
------------------------
//Bean to send message, make sure you have a client like netcat running and listening on port //23000
//Filename :SendTestMessage.java
package a.b;
import org.jpos.iso.ISOException;
import org.jpos.iso.ISOMsg;
import org.jpos.iso.ISOServer;
import org.jpos.q2.QBeanSupport;
import org.jpos.q2.iso.QMUX;
import org.jpos.util.NameRegistrar;
public class SendTestMessage extends QBeanSupport {
private ISOServer isoServer;
@Override
protected void startService() throws Exception {
QMUX qmux = (QMUX) NameRegistrar.getIfExists("mux.qserver-mux");
isoServer = ISOServer.getServer("server-1");
if (isoServer.getConnections() > 0 && qmux != null) {
try {
if (qmux.isConnected()) {
ISOMsg m = new ISOMsg();
m.setMTI("0100");
m.set(2, "123456789012345");
m.set(11, "901234"); // 11 needs to be there else it wont get sent,
// I have configured it as the mux key
m.set(41, "12345678");// As they are used as a default key by mux
qmux.request(m,5000);
}
}
catch (ISOException e) {
}
}
}
}
-------------------------
// RequestListener defined in Server but never used right now.
package a.b;
import org.jpos.iso.ISOMsg;
import org.jpos.iso.ISORequestListener;
import org.jpos.iso.ISOSource;
public class MyRequestListener implements ISORequestListener {
@Override
public boolean process(ISOSource source, ISOMsg m) {
return false;
}
}
--------------------------------
Best of luck.
-chhilOn Mon, Jun 10, 2013 at 10:28 PM, Mark Salter <marks...@talktalk.net> wrote:
Please stop opening new threads on this same problem.
On 10/06/2013 14:27, pugazhendhi t wrote:
>
> can anyone help me in doing this ... ?
There are outstanding questions (to you) on the existing threads, please
answer those questions first.
Your questions and their lack of 'smartness' is not helping you achieve
what is a very simple thing using jPOS-ee.
The lack of information in your 'un-smart' questions is not helping...
... sorry to be so blunt.
>
> i tried in lot of way, but its of no use
You appear to be trying random things and not listening to advise or
providing the detail needed to help.
> does anyone have samples for
> this anywhere ?
The detail you need is already available - in documentation/mailing
list/search/engine, but you have missed it or failed to follow it.
Chasing an answer for free just isn't going to help either.
Have a careful read through the link about smart questions I have shared
with you at least once and then spend some time checking you have
answered the questions poised to you (answer them just once though as
some have been asked more than once), or....
... just try and ask a single smart question on this new thread if you
find that will be easier for us all.
--
Mark
--
--
jPOS is licensed under AGPL - free for community usage for your open-source project. Licenses are also available for commercial usage.
Please support jPOS, contact: sa...@jpos.org
You received this message because you are subscribed to the "jPOS Users" group.
Please see http://jpos.org/wiki/JPOS_Mailing_List_Readme_first
To post to this group, send email to jpos-...@googlegroups.com
To unsubscribe, send email to jpos-...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/jpos-users
---
You received this message because you are subscribed to the Google Groups "jPOS Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jpos-...@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to jpos-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jpos-users/6bb64b41-488a-444b-b18e-4fc10d3721e3%40googlegroups.com.