MTI MAPPING : "0123456789 0123456789 0022446769"
Mux Key configuration :
empty MTI : 12
Also tried to add :
1460 : 12
1480 : 12
I receive and unpack the reply, but jpos doesn't seem to match it with the request.
What am I doing wrong please?
Regards,
Charlélie Bouvier
--
--
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 Google Groups "jPOS Users" group.
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/aef812c1-7f2c-44a9-9473-3a3c0a8f55a3n%40googlegroups.com.
--
--
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 Google Groups "jPOS Users" group.
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/2573ce60-d574-4d7f-a57a-86e27a4bf648n%40googlegroups.com.
I believe your
problem is with the mtiMapping
and that the third mapping should be 0022446869
for mapping the response to the third digit from 6 to 8.
Hope this helps.
To view this discussion on the web visit https://groups.google.com/d/msgid/jpos-users/de452ac3-d922-42bf-ab40-0b8a4e060b69n%40googlegroups.com.
I revisited this after making time to check the code (see
https://github.com/jpos/jPOS/blob/master/jpos/src/main/java/org/jpos/q2/iso/QMUX.java#L246
and
https://github.com/jpos/jPOS/blob/master/jpos/src/main/java/org/jpos/q2/iso/QMUX.java#L285
for the relevant parts for the response key evolution from the
request.
*Alcarraz* shared the right solution and I think I managed to confuse myself/you...
... the mtimapping elements are applied to the request MTI is sent to form a key on which the response should match, so it needs to mtimapping 1460 onto 1480, meaning that your mtimapping setup should be :-
<mtimapping>0123456789 0123456789 0022448789</mtimapping>
so that the 3rd digit (6) in the request MTI, is mapped to 8 to match what the response is expected to have as its MTI.
So please try as above and I think all will be well.
--
To view this discussion on the web visit https://groups.google.com/d/msgid/jpos-users/dd0c04e1-8658-4f27-9d68-25345e328481n%40googlegroups.com.
public static void main(String[] args) throws ISOException {
String s1 = mapMTI("1460");
String s2 = mapMTI("1480");
if (s1.equals(s2)) {
System.out.println("mapping works");
}
}
// JPOS code to map mti with some edits to make it work standalone.
private static String mapMTI(String mti) throws ISOException {
String nomap = "0123456789";
String[] mtiMapping = new String[] { nomap, nomap, "0022446769" }; // <-- position 8 is a 6. 8 is the third position from the response 1480 and the 8 in the 3rd mtimapping needs to be changed to 6.
StringBuilder sb = new StringBuilder();
if (mti != null) {
if (mti.length() < 4)
mti = ISOUtil.zeropad(mti, 4); // #jPOS-55
if (mti.length() == 4) {
for (int i = 0; i < mtiMapping.length; i++) {
int c = mti.charAt(i) - '0';
if (c >= 0 && c < 10)
sb.append(mtiMapping[i].charAt(c));
}
}
}
return sb.toString();
}
Good catch!
I wonder how a configuration to the mux could be added to treat some MTIs as responses, the most obvious would be a property like:
<property name="force-response-mtis" value="1480"/>
Or just response-mtis
.
Just for the sake of completeness, we could do the same for
requests, not sure about we should.
But there sure be a more clever way.
Regards.
To view this discussion on the web visit https://groups.google.com/d/msgid/jpos-users/0fb3aef5-8333-42b5-a895-c94140d695d7n%40googlegroups.com.
You received this message because you are subscribed to a topic in the Google Groups "jPOS Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/jpos-users/uSYPjJaorQQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to jpos-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jpos-users/a8667cd9-9bd9-9a02-d947-d18c3ce1bfd2%40gmail.com.
Work-around may be to set the QMUX config flag "return-rejects" to true, however, this is not currently exposed by the JMeter plugin unfortunately.