Need help debugging bitmap

View: New views
13 Messages — Rating Filter:   Alert me  

Need help debugging bitmap

by rubentopo :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


OK, so i've got some problems working with my ISOMsg, the thing is i
am communicating with a server that is not the authorization server,
i'm communicating with a ref server and i am sending an ISO message
that apparently is much much much smaller than it should. I need to
generate a binary bitmap and MTI should be 0100, something is terribly
wrong, but i can't tell. (Using old version 1.4.8). Is there anything
that can cause my message to be the wrong size?

Here's the first 4 bytes from my message:
iso8583 Sending 1
iso8583 Sending 0
iso8583 Sending 114
iso8583 Sending 60

Shouldn't the first 4 be 0100?

Extract from my packager's xml
<!-- ISO 8583:1987 (BINARY) field descriptions for GenericPackager -->

<isopackager>
  <isofield
      id="0"
      length="4"
      name="MESSAGE TYPE INDICATOR"
      pad="true"
      class="org.jpos.iso.IFB_NUMERIC"/>
  <isofield
      id="1"
      length="16"
      name="BIT MAP"
      class="org.jpos.iso.IFB_BITMAP"/>
  <isofield
      id="2"
      length="19"
      name="PAN - PRIMARY ACCOUNT NUMBER"
      pad="false"
      class="org.jpos.iso.IFB_LLHNUM"/>
  <isofield
      id="3"
      length="6"
      name="PROCESSING CODE"
      pad="true"
      class="org.jpos.iso.IFB_NUMERIC"/>

Any clues?, I'm trully clueless at the time, if anyone has anything
that may be helpful I'd appreciate it greatly!
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "jPOS Users" group.
To post to this group, send email to jpos-users@...
To unsubscribe from this group, send email to jpos-users+unsubscribe@...
For more options, visit this group at http://groups.google.com/group/jpos-users?hl=en
-~----------~----~----~----~------~----~------~--~---


RE: Need help debugging bitmap

by Andy Orrock-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Is there a header defined?  Do you have a hex dump of the formatted request
you can show us?

Andy

-----Original Message-----
From: jpos-users@... [mailto:jpos-users@...] On
Behalf Of rubentopo
Sent: Thursday, September 04, 2008 11:37 AM
To: jPOS Users
Subject: Need help debugging bitmap


OK, so i've got some problems working with my ISOMsg, the thing is i
am communicating with a server that is not the authorization server,
i'm communicating with a ref server and i am sending an ISO message
that apparently is much much much smaller than it should. I need to
generate a binary bitmap and MTI should be 0100, something is terribly
wrong, but i can't tell. (Using old version 1.4.8). Is there anything
that can cause my message to be the wrong size?

Here's the first 4 bytes from my message:
iso8583 Sending 1
iso8583 Sending 0
iso8583 Sending 114
iso8583 Sending 60

Shouldn't the first 4 be 0100?

Extract from my packager's xml
<!-- ISO 8583:1987 (BINARY) field descriptions for GenericPackager -->

<isopackager>
  <isofield
      id="0"
      length="4"
      name="MESSAGE TYPE INDICATOR"
      pad="true"
      class="org.jpos.iso.IFB_NUMERIC"/>
  <isofield
      id="1"
      length="16"
      name="BIT MAP"
      class="org.jpos.iso.IFB_BITMAP"/>
  <isofield
      id="2"
      length="19"
      name="PAN - PRIMARY ACCOUNT NUMBER"
      pad="false"
      class="org.jpos.iso.IFB_LLHNUM"/>
  <isofield
      id="3"
      length="6"
      name="PROCESSING CODE"
      pad="true"
      class="org.jpos.iso.IFB_NUMERIC"/>

Any clues?, I'm trully clueless at the time, if anyone has anything
that may be helpful I'd appreciate it greatly!


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "jPOS Users" group.
To post to this group, send email to jpos-users@...
To unsubscribe from this group, send email to jpos-users+unsubscribe@...
For more options, visit this group at http://groups.google.com/group/jpos-users?hl=en
-~----------~----~----~----~------~----~------~--~---


RE: Need help debugging bitmap

by David Bergert-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


>
> OK, so i've got some problems working with my ISOMsg, the thing is i
> am communicating with a server that is not the authorization server,
> i'm communicating with a ref server and i am sending an ISO message
> that apparently is much much much smaller than it should.

Have you trying to look at the output of ISOMsg.pack() ?
How is your message short ? does it not contain files ? are you setting the
fields with ISOMsg.set() and ISOMsg.setMTI()?

> I need to
> generate a binary bitmap and MTI should be 0100, something is terribly
> wrong, but i can't tell. (Using old version 1.4.8).

Is the message the wrong size? or is the wire protocol expecting an length
header, this is typically performed in the jPOS channel.

 Is there anything

> that can cause my message to be the wrong size?
>
> Here's the first 4 bytes from my message:
> iso8583 Sending 1
> iso8583 Sending 0
> iso8583 Sending 114
> iso8583 Sending 60
>
> Shouldn't the first 4 be 0100?
>

Actually, depending on the character set, the first two bytes of the ISO8583
message should be 0x10 0x00, many implemenation have a 2 or 4 byte length
header, in either network or host byte order.

> Any clues?, I'm trully clueless at the time, if anyone has anything
> that may be helpful I'd appreciate it greatly!

We need more information in order to help. can you provide us a hex dump of
the message ? can you get interface specs that document the wire protocol of
the interface you are connecting to ?

--Dave
www.paymentsystemsblog.com



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "jPOS Users" group.
To post to this group, send email to jpos-users@...
To unsubscribe from this group, send email to jpos-users+unsubscribe@...
For more options, visit this group at http://groups.google.com/group/jpos-users?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: Need help debugging bitmap

by rubentopo :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


These are the bytes that i sent, nope i don't use a header, should i?.
I append the ISO request in another message, so that's why i'm sending
the bytes like this instead of using jpos transactions.

iso8583 Sending 1
iso8583 Sending 0
iso8583 Sending 114
iso8583 Sending 60
iso8583 Sending 96
iso8583 Sending 1
iso8583 Sending 8
iso8583 Sending -64
iso8583 Sending -128
iso8583 Sending 0
iso8583 Sending 13
iso8583 Sending 68
iso8583 Sending -123
iso8583 Sending 69
iso8583 Sending 87
iso8583 Sending 35
iso8583 Sending 37
iso8583 Sending 80
iso8583 Sending 0
iso8583 Sending 48
iso8583 Sending 0
iso8583 Sending 0
iso8583 Sending 0
iso8583 Sending 0
iso8583 Sending 0
iso8583 Sending 18
iso8583 Sending -103
iso8583 Sending 9
iso8583 Sending 4
iso8583 Sending 17
iso8583 Sending 8
iso8583 Sending 4
iso8583 Sending 0
iso8583 Sending 0
iso8583 Sending -106
iso8583 Sending 17
iso8583 Sending 8
iso8583 Sending 4
iso8583 Sending 9
iso8583 Sending 4
iso8583 Sending 18
iso8583 Sending 19
iso8583 Sending 85
iso8583 Sending 51
iso8583 Sending 8
iso8583 Sending 64
iso8583 Sending 11
iso8583 Sending -16
iso8583 Sending -16
iso8583 Sending -16
iso8583 Sending -16
iso8583 Sending -16
iso8583 Sending 0
iso8583 Sending -41
iso8583 Sending -30
iso8583 Sending -63
iso8583 Sending -39
iso8583 Sending -16
iso8583 Sending -16
iso8583 Sending -16
iso8583 Sending -16
iso8583 Sending -7
iso8583 Sending -10
iso8583 Sending 64
iso8583 Sending 64
iso8583 Sending -41
iso8583 Sending -30
iso8583 Sending -63
iso8583 Sending -39
iso8583 Sending -14
iso8583 Sending -41
iso8583 Sending -61
iso8583 Sending -55
iso8583 Sending 64
iso8583 Sending 64
iso8583 Sending 64
iso8583 Sending 64
iso8583 Sending 64
iso8583 Sending 64
iso8583 Sending 64
iso8583 Sending 64
iso8583 Sending 64
iso8583 Sending 64
iso8583 Sending 64
iso8583 Sending 64
iso8583 Sending 64
iso8583 Sending 64
iso8583 Sending 64
iso8583 Sending 64
iso8583 Sending 64
iso8583 Sending 64
iso8583 Sending 64
iso8583 Sending 64
iso8583 Sending 64
iso8583 Sending 64
iso8583 Sending 8
iso8583 Sending 64

Hope this helps, i appreciate greatly your help!

On Sep 4, 10:44 am, "Andy Orrock" <aaorr...@...> wrote:

> Is there a header defined?  Do you have a hex dump of the formatted request
> you can show us?
>
> Andy
>
>
>
> -----Original Message-----
> From: jpos-users@... [mailto:jpos-users@...] On
>
> Behalf Of rubentopo
> Sent: Thursday, September 04, 2008 11:37 AM
> To: jPOS Users
> Subject: Need help debugging bitmap
>
> OK, so i've got some problems working with my ISOMsg, the thing is i
> am communicating with a server that is not the authorization server,
> i'm communicating with a ref server and i am sending an ISO message
> that apparently is much much much smaller than it should. I need to
> generate a binary bitmap and MTI should be 0100, something is terribly
> wrong, but i can't tell. (Using old version 1.4.8). Is there anything
> that can cause my message to be the wrong size?
>
> Here's the first 4 bytes from my message:
> iso8583 Sending 1
> iso8583 Sending 0
> iso8583 Sending 114
> iso8583 Sending 60
>
> Shouldn't the first 4 be 0100?
>
> Extract from my packager's xml
> <!-- ISO 8583:1987 (BINARY) field descriptions for GenericPackager -->
>
> <isopackager>
>   <isofield
>       id="0"
>       length="4"
>       name="MESSAGE TYPE INDICATOR"
>       pad="true"
>       class="org.jpos.iso.IFB_NUMERIC"/>
>   <isofield
>       id="1"
>       length="16"
>       name="BIT MAP"
>       class="org.jpos.iso.IFB_BITMAP"/>
>   <isofield
>       id="2"
>       length="19"
>       name="PAN - PRIMARY ACCOUNT NUMBER"
>       pad="false"
>       class="org.jpos.iso.IFB_LLHNUM"/>
>   <isofield
>       id="3"
>       length="6"
>       name="PROCESSING CODE"
>       pad="true"
>       class="org.jpos.iso.IFB_NUMERIC"/>
>
> Any clues?, I'm trully clueless at the time, if anyone has anything
> that may be helpful I'd appreciate it greatly!- Hide quoted text -
>
> - Show quoted text -
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "jPOS Users" group.
To post to this group, send email to jpos-users@...
To unsubscribe from this group, send email to jpos-users+unsubscribe@...
For more options, visit this group at http://groups.google.com/group/jpos-users?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: Need help debugging bitmap

by Mark Salter-5 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


rubentopo wrote:

> These are the bytes that i sent, nope i don't use a header, should i?.
> I append the ISO request in another message, so that's why i'm sending
> the bytes like this instead of using jpos transactions.
>
> iso8583 Sending 1
> iso8583 Sending 0
> iso8583 Sending 114
> iso8583 Sending 60
> iso8583 Sending 96
> iso8583 Sending 1
> iso8583 Sending 8
> iso8583 Sending -64
> iso8583 Sending -128
[snip integer values]
These values are the integer representation of the binary data held in
each byte and as such are not at all useful....

.. The output from ISOMsg.dump(System.out,"") would be a better way for
you to present the content of your ISOMsg to us.

The hexadecimal dump of the values you have given is:-

0100723C600108C0 80000D4485455723
2550003000000000 0012990904110804
0000961108040904 1213553308400BF0
F0F0F0F000D7E2C1 D9F0F0F0F0F9F640
40D7E2C1D9F2D7C3 C940404040404040
4040404040404040 4040404040404008
40

As you can see it includes binary as well as EBCDIC characters, which
might match your entire packager - I can't tell though you only should
us the definition of the first few fields.

For example, your card number appears to be 4485455723255? It seems like
a strange length to me, but moving on...

Is it possible that the message is considered 'short' by the recipient
because they are taking the first two bytes you are sending as a length
x'0100' (which is actually) your MTI and then expecting 256 byte to
follow afterwards and your message is only 97 or 95 chopping off the
MTI/length?

What channel are you using to send this message through? And does the
chosen channel send the message length in the format that the recipient
is expecting?

--
Mark

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "jPOS Users" group.
To post to this group, send email to jpos-users@...
To unsubscribe from this group, send email to jpos-users+unsubscribe@...
For more options, visit this group at http://groups.google.com/group/jpos-users?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: Need help debugging bitmap

by rubentopo :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Mark, thanks for your input, here's what i've got out of the dump:

The credit card # that i'm using is a random visa cc that i pulled
from a website just to test http://www.darkcoding.net/credit-card-numbers/
and yes, you were correct about my hex dump
*****DUMP***
<isomsg>
  <field id="0" value="0100"/>
  <field id="2" value="4485455723255"/>
  <field id="3" value="003000"/>
  <field id="4" value="1299"/>
  <field id="7" value="0904145241"/>
  <field id="11" value="96"/>
  <field id="12" value="145241"/>
  <field id="13" value="0904"/>
  <field id="14" value="1213"/>
  <field id="18" value="5533"/>
  <field id="19" value="840"/>
  <field id="32" value="           "/>
  <field id="37" value="PSAR000096"/>
  <field id="41" value="PSAR2PCI"/>
  <field id="42" value="               "/>
  <field id="49" value="840"/>
</isomsg>

**HEX DUMP****
0000  01 00 72 3C 60 01 08 C0  80 00 0D 44 85 45 57
23  ..r<`......D.EW#
0010  25 50 00 30 00 00 00 00  00 12 99 09 04 14 52 41  %P.
0..........RA
0020  00 00 96 14 52 41 09 04  12 13 55 33 08 40 0B
F0  ....RA....U3.@..
0030  F0 F0 F0 F0 00 D7 E2 C1  D9 F0 F0 F0 F0 F9 F6
40  ...............@
0040  40 D7 E2 C1 D9 F2 D7 C3  C9 40 40 40 40 40 40 40
@........@@@@@@@
0050  40 40 40 40 40 40 40 40  40 40 40 40 40 40 40 08
@@@@@@@@@@@@@@@.
0060  40                                                @

According to http://iso8583.info/decoder/ i have this bitmap
0000000000000001000000000000000001110010000000111100000001100000
so i'm doing something terribly wrong, but i can't figure out what it
is, i've tryed a number of packagers and none seem to work the way i
need them to work.

Best regards, thanks for all the help!

On Sep 4, 1:14 pm, Mark Salter <marksal...@...> wrote:

> rubentopo wrote:
> > These are the bytes that i sent, nope i don't use a header, should i?.
> > I append the ISO request in another message, so that's why i'm sending
> > the bytes like this instead of using jpos transactions.
>
> > iso8583 Sending 1
> > iso8583 Sending 0
> > iso8583 Sending 114
> > iso8583 Sending 60
> > iso8583 Sending 96
> > iso8583 Sending 1
> > iso8583 Sending 8
> > iso8583 Sending -64
> > iso8583 Sending -128
>
> [snip integer values]
> These values are the integer representation of the binary data held in
> each byte and as such are not at all useful....
>
> .. The output from ISOMsg.dump(System.out,"") would be a better way for
> you to present the content of your ISOMsg to us.
>
> The hexadecimal dump of the values you have given is:-
>
> 0100723C600108C0 80000D4485455723
> 2550003000000000 0012990904110804
> 0000961108040904 1213553308400BF0
> F0F0F0F000D7E2C1 D9F0F0F0F0F9F640
> 40D7E2C1D9F2D7C3 C940404040404040
> 4040404040404040 4040404040404008
> 40
>
> As you can see it includes binary as well as EBCDIC characters, which
> might match your entire packager - I can't tell though you only should
> us the definition of the first few fields.
>
> For example, your card number appears to be 4485455723255? It seems like
> a strange length to me, but moving on...
>
> Is it possible that the message is considered 'short' by the recipient
> because they are taking the first two bytes you are sending as a length
> x'0100' (which is actually) your MTI and then expecting 256 byte to
> follow afterwards and your message is only 97 or 95 chopping off the
> MTI/length?
>
> What channel are you using to send this message through? And does the
> chosen channel send the message length in the format that the recipient
> is expecting?
>
> --
> Mark
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "jPOS Users" group.
To post to this group, send email to jpos-users@...
To unsubscribe from this group, send email to jpos-users+unsubscribe@...
For more options, visit this group at http://groups.google.com/group/jpos-users?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: Need help debugging bitmap

by Mark Salter-5 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


rubentopo wrote:
> Mark, thanks for your input, here's what i've got out of the dump:
>
> The credit card # that i'm using is a random visa cc that i pulled
> from a website just to test http://www.darkcoding.net/credit-card-numbers/
Did you get the whole number or truncate it?

> and yes, you were correct about my hex dump
> *****DUMP***
> <isomsg>
>   <field id="0" value="0100"/>
>   <field id="2" value="4485455723255"/>
>   <field id="3" value="003000"/>
>   <field id="4" value="1299"/>
>   <field id="7" value="0904145241"/>
>   <field id="11" value="96"/>
>   <field id="12" value="145241"/>
>   <field id="13" value="0904"/>
>   <field id="14" value="1213"/>
>   <field id="18" value="5533"/>
>   <field id="19" value="840"/>
>   <field id="32" value="           "/>
>   <field id="37" value="PSAR000096"/>
>   <field id="41" value="PSAR2PCI"/>
>   <field id="42" value="               "/>
>   <field id="49" value="840"/>
> </isomsg>
>
[snip mangled hex dump]

                                         @
>
> According to http://iso8583.info/decoder/ i have this bitmap
> 0000000000000001000000000000000001110010000000111100000001100000
> so i'm doing something terribly wrong, but i can't figure out what it
> is, i've tryed a number of packagers and none seem to work the way i
> need them to work.
Slow down a bit please...

Why do you think something is wrong?
What are the precise symptoms that indicate a problem?  You have
mentioned that the message is short, but what (that you have placed in
the message) is missing?
Also WHO thinks the message is short - and how did they decide this was
the case?

You may need to write your own packager, trying 'random' ones in the
hope that one will just work, might be considered impracticable.
As David has already asked, do you have the interface specification
documentation that your message and network protocols need to meet?

If you can answer all of the question so far posed (mine plus David's
plus Andy's) we can probably start helping you much more effectively.

--
Mark

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "jPOS Users" group.
To post to this group, send email to jpos-users@...
To unsubscribe from this group, send email to jpos-users+unsubscribe@...
For more options, visit this group at http://groups.google.com/group/jpos-users?hl=en
-~----------~----~----~----~------~----~------~--~---


RE: Need help debugging bitmap

by David Bergert-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


> >
> > According to http://iso8583.info/decoder/ i have this bitmap
> > 0000000000000001000000000000000001110010000000111100000001100000
> > so i'm doing something terribly wrong, but i can't figure out what it
> > is, i've tryed a number of packagers and none seem to work the way i
> > need them to work.

Just for Fun:

------------------------------------------------

import org.jpos.iso.*;
import java.util.BitSet;
import org.jpos.iso.packager.*;

public class Main {

    public static void main(String[] args) {
       
        try {
            ISOMsg myISOMsg = new ISOMsg();

            ISOPackager p = new GenericPackager ("iso87binary.xml");
           
            myISOMsg.setPackager (p);
           
            myISOMsg.setMTI("100");
            myISOMsg.set(2, "4485455723255");
            myISOMsg.set(3,"003000");
            myISOMsg.set(4,"1299");
            myISOMsg.set(7,"0904145241");
            myISOMsg.set(11,"96");        
            myISOMsg.set(12,"145241");
            myISOMsg.set(13,"0904");
            myISOMsg.set(14,"1213");
            myISOMsg.set(18,"5533");
            myISOMsg.set(19,"840");
            myISOMsg.set(32,"           ");
            myISOMsg.set(37,"PSAR000096");
            myISOMsg.set(41,"PSAR2PCI");
            myISOMsg.set(42,"               ");
            myISOMsg.set(49,"840");

            myISOMsg.recalcBitMap();
            BitSet bset = (BitSet) myISOMsg.getValue(-1);

            System.out.println("Message: " +
ISOUtil.hexString(myISOMsg.pack()));
            System.out.println("BitMap : " + bset.toString());
            System.out.println("BitMap : "  +
org.jpos.iso.ISOUtil.bitSet2String(bset));
               
            } catch (Exception e) {
                e.printStackTrace();
            }
    }
}
------------------------------------------------
This program outputs:

Message:
0100723C600108C0800013448545572325500030000000000012990904145241000096145241
090412135533084011F0F0F0F0F0005053415230303030393620205053415232504349202020
202020202020202020202020383430
BitMap : {2, 3, 4, 7, 11, 12, 13, 14, 18, 19, 32, 37, 41, 42, 49}
BitMap : 0011100100011110001100000000000010000100011000000100000000000000

--------


MTI: 0100
Bitmap : 723C600108C08000
The rest are fields according to the packager -- I used a generic one which
may or may not be the same one for your implementation (Actually I know it
isn't -- my example is ASCII while your previous dump is in EBCDIC, but this
should help make a point.)

So the http://iso8583.info/decoder/ does not work, or more accurately, the
input values that you are passing it are probably not what it expects,
because 0000000000000001000000000000000001110010000000111100000001100000 -
is not your bitmap.

Your ISO message looks fine to me, I think your problem is sending this
message to an endpoint ?

Typically[1] the process for sending receiving looks similar to this:

[length header] [ISO Message]

Your message appears to be 183 bytes.

183 Decimal to Hex = B7

so with a 2 byte length header you would send:

[00 B7] [Message]

With a 4 byte Length Header

[00 00 00 B7] [Message]


you would the opposite on recieve. read the first 2 or 4 or x bytes, then
read the remainder up to the message length passed in the header.

This all depends on the interface specs, it could be a different byte order
depending on the processor of the platform, and whether it is big-Endian or
little-endian, Character sets, such as ASCII, EBCDIC, BCD, HEX, others etc
all come in play as well, some lengths are just the length of the message,
others of lengths of the message and length.

--Dave
http://www.paymentsystemsblog.com



[1] note that they can be other headers, TPDU, trailers, and other goodies
around the ISO8583 Message depending on the interface specs.















--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "jPOS Users" group.
To post to this group, send email to jpos-users@...
To unsubscribe from this group, send email to jpos-users+unsubscribe@...
For more options, visit this group at http://groups.google.com/group/jpos-users?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: Need help debugging bitmap

by rubentopo :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


I think i found out what i'm missing:

I'm sending the bytes myself (not using any class that extends
BaseChannel to send the messages), i am sending them directly through
a socket an I'm missing this

                sendMessageLength(b.length + getHeaderLength());
                sendMessageHeader(m, b.length);
                sendMessage (b, 0, b.length);
                sendMessageTrailler(m, b.length);

I hope this doesn't sound like a long shot, thanks for your help and
feedback!
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "jPOS Users" group.
To post to this group, send email to jpos-users@...
To unsubscribe from this group, send email to jpos-users+unsubscribe@...
For more options, visit this group at http://groups.google.com/group/jpos-users?hl=en
-~----------~----~----~----~------~----~------~--~---


RE: Need help debugging bitmap

by David Bergert-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Ruben:

I believe that this is your issue, and what myself and Mark suspected base
on your emails.

Depending on your interface you might need to modify the following:


From CSChannel.java

  protected void sendMessageLength(int len) throws IOException {
        serverOut.write (len >> 8);
        serverOut.write (len);
        serverOut.write (0);
        serverOut.write (0);
    }
    /**
     * @return the Message len
     * @exception IOException, ISOException
     */
    protected int getMessageLength() throws IOException, ISOException {
        int l = 0;
        byte[] b = new byte[4];
        while (l == 0) {
            serverIn.readFully(b,0,4);
            l = ((((int)b[0])&0xFF) << 8) | (((int)b[1])&0xFF);
            if (l == 0) {
                serverOut.write(b);
                serverOut.flush();
            }
        }
        return l;
    }

--Dave
http://www.paymentsystemsblog.com

> -----Original Message-----
> From: jpos-users@... [mailto:jpos-users@...] On
> Behalf Of rubentopo
> Sent: Thursday, September 04, 2008 5:10 PM
> To: jPOS Users
> Subject: Re: Need help debugging bitmap
>
>
> I think i found out what i'm missing:
>
> I'm sending the bytes myself (not using any class that extends
> BaseChannel to send the messages), i am sending them directly through
> a socket an I'm missing this
>
>                 sendMessageLength(b.length + getHeaderLength());
>                 sendMessageHeader(m, b.length);
>                 sendMessage (b, 0, b.length);
>                 sendMessageTrailler(m, b.length);
>
> I hope this doesn't sound like a long shot, thanks for your help and
> feedback!
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "jPOS Users" group.
To post to this group, send email to jpos-users@...
To unsubscribe from this group, send email to jpos-users+unsubscribe@...
For more options, visit this group at http://groups.google.com/group/jpos-users?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: Need help debugging bitmap

by rubentopo :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Yeap, that was it, thak you all for your help and patience, best
regards!

On Sep 4, 4:18 pm, "David Bergert" <dbergert...@...> wrote:

> Ruben:
>
> I believe that this is your issue, and what myself and Mark suspected base
> on your emails.
>
> Depending on your interface you might need to modify the following:
>
> From CSChannel.java
>
>   protected void sendMessageLength(int len) throws IOException {
>         serverOut.write (len >> 8);
>         serverOut.write (len);
>         serverOut.write (0);
>         serverOut.write (0);
>     }
>     /**
>      * @return the Message len
>      * @exception IOException, ISOException
>      */
>     protected int getMessageLength() throws IOException, ISOException {
>         int l = 0;
>         byte[] b = new byte[4];
>         while (l == 0) {
>             serverIn.readFully(b,0,4);
>             l = ((((int)b[0])&0xFF) << 8) | (((int)b[1])&0xFF);
>             if (l == 0) {
>                 serverOut.write(b);
>                 serverOut.flush();
>             }
>         }
>         return l;
>     }
>
> --Davehttp://www.paymentsystemsblog.com
>
>
>
> > -----Original Message-----
> > From: jpos-users@... [mailto:jpos-users@...] On
> > Behalf Of rubentopo
> > Sent: Thursday, September 04, 2008 5:10 PM
> > To: jPOS Users
> > Subject: Re: Need help debugging bitmap
>
> > I think i found out what i'm missing:
>
> > I'm sending the bytes myself (not using any class that extends
> > BaseChannel to send the messages), i am sending them directly through
> > a socket an I'm missing this
>
> >                 sendMessageLength(b.length + getHeaderLength());
> >                 sendMessageHeader(m, b.length);
> >                 sendMessage (b, 0, b.length);
> >                 sendMessageTrailler(m, b.length);
>
> > I hope this doesn't sound like a long shot, thanks for your help and
> > feedback!- Hide quoted text -
>
> - Show quoted text -
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "jPOS Users" group.
To post to this group, send email to jpos-users@...
To unsubscribe from this group, send email to jpos-users+unsubscribe@...
For more options, visit this group at http://groups.google.com/group/jpos-users?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: Need help debugging bitmap

by cheef000 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


> Message:
> 0100723C600108C080001344854557232550003000000000001299090414524100009614524­1
> 090412135533084011F0F0F0F0F000505341523030303039362020505341523250434920202­0
> 202020202020202020202020383430
> BitMap : {2, 3, 4, 7, 11, 12, 13, 14, 18, 19, 32, 37, 41, 42, 49}
> BitMap : 0011100100011110001100000000000010000100011000000100000000000000
>
> --------
>
> MTI: 0100
> Bitmap : 723C600108C08000
> The rest are fields according to the packager -- I used a generic one which
> may or may not be the same one for your implementation (Actually I know it
> isn't -- my example is ASCII while your previous dump is in EBCDIC, but this
> should help make a point.)
>
> So the http://iso8583.info/decoder/ does not work, or more accurately, the
> input values that you are passing it are probably not what it expects,
> because 0000000000000001000000000000000001110010000000111100000001100000 -
> is not your bitmap.

Site work correctly with this field

Just read instruction and post right data

I try post this:
0100723c600108c0800013448545572325500030000000000012990904145241000096145241090412135533084011f0f0f0f0f0005053415230303030393620205053415232504349202020202020202020202020202020383430

and get
<pre>
#-----+--------------------------------- Cheef's iso8583 decoder v.
2008.08.07 -+
|field| Value                         | bold        |            |
green       |
|     | Description                   | default     |=additional |
=full        |
+-----
+------------------------------------------------------------------------
+
| MTI |
0100
|
|     | Message type - authorization
request                                   |
| 000 |
723c600108c08000
|
|     | Primary Bit
Maps                                                       |
|     |
=0111001000111100011000000000000100001000110000001000000000000000
|
| 002 |
44854557232550
|
|     | Primary Account
Number                                                 |
| 003 |
003000
|
|     | Processing
Code                                                        |
| 004 |
000000001299
|
|     | Amount,
Transaction                                                    |
| 007 |
0904145241
|
|     | MMDDHHMMSS - Transmission date &
time                                  |
| 011 |
000096
|
|     | Systems Trace
Number                                                   |
| 012 |
145241
|
|     | HHMMSS - Time, Local
Transaction                                       |
| 013 |
0904
|
|     | MMDD - Date, Local
Transaction                                         |
| 014 |
1213
|
|     | YYMM - Date,
Expiration                                                |
| 018 |
5533
|
|     | Merchant
type                                                          |
| 019 |
0840
|
|     | country code, Acquiring
institution                                    |
| 032 |
f0f0f0f0f000
|
|     | Acquiring institution identification
code                              |
| 037 |
505341523030303039362020
|
|     | Retrieval Reference Number
(RRN)                                       |
|     |
=PSAR000096
|
| 041 |
5053415232504349
|
|     | Card Acquirer Terminal
Id                                              |
|     |
=PSAR2PCI
|
| 042 |
202020202020202020202020202020
|
|     | Card Acquirer
Id                                                       |
|     |
=
|
| 049 |
383430
|
|     | Currency Code,
Transaction                                             |
|     |
=840
|
|     |=US
Dollar                                                              |
+-----
+------------------------------------------------------------------------
+
| Generated for ***.***.***.*** (today 1 times) at Wed Sep 24 10:02:43
2008    |
+-----
+------------------------------------------------------------------------
+
</pre>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "jPOS Users" group.
To post to this group, send email to jpos-users@...
To unsubscribe from this group, send email to jpos-users+unsubscribe@...
For more options, visit this group at http://groups.google.com/group/jpos-users?hl=en
-~----------~----~----~----~------~----~------~--~---


RE: Need help debugging bitmap

by David Bergert-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Great!

Thanks for developing and sharing this tool Alex.
In the original post - the user was not sending the proper data to your tool
as you clearly state:
"Please do not write other 'prefix' bytes.(like buffer length or
communication bytes.)"

Спасибо,

DB
www.paymentsystemsblog.com

> -----Original Message-----
> From: jpos-users@... [mailto:jpos-users@...]
> On Behalf Of cheef000
> Sent: Wednesday, September 24, 2008 1:13 AM
> To: jPOS Users
> Subject: Re: Need help debugging bitmap
>
>
> > Message:
> >
> 0100723C600108C08000134485455723255000300000000000129909041452410000961
> 4524-1
> >
> 090412135533084011F0F0F0F0F00050534152303030303936202050534152325043492
> 0202-0
> > 202020202020202020202020383430
> > BitMap : {2, 3, 4, 7, 11, 12, 13, 14, 18, 19, 32, 37, 41, 42, 49}
> > BitMap :
> 0011100100011110001100000000000010000100011000000100000000000000
> >
> > --------
> >
> > MTI: 0100
> > Bitmap : 723C600108C08000
> > The rest are fields according to the packager -- I used a generic one
> which
> > may or may not be the same one for your implementation (Actually I
> know it
> > isn't -- my example is ASCII while your previous dump is in EBCDIC,
> but this
> > should help make a point.)
> >
> > So the http://iso8583.info/decoder/ does not work, or more
> accurately, the
> > input values that you are passing it are probably not what it
> expects,
> > because
> 0000000000000001000000000000000001110010000000111100000001100000 -
> > is not your bitmap.
>
> Site work correctly with this field
>
> Just read instruction and post right data
>
> I try post this:
> 0100723c600108c08000134485455723255000300000000000129909041452410000961
> 45241090412135533084011f0f0f0f0f000505341523030303039362020505341523250
> 4349202020202020202020202020202020383430
>
> and get
> <pre>
> #-----+--------------------------------- Cheef's iso8583 decoder v.
> 2008.08.07 -+
> |field| Value                         | bold        |            |
> green       |
> |     | Description                   | default     |=additional |
> =full        |
> +-----
> +----------------------------------------------------------------------
> --
> +
> | MTI |
> 0100
> |
> |     | Message type - authorization
> request                                   |
> | 000 |
> 723c600108c08000
> |
> |     | Primary Bit
> Maps                                                       |
> |     |
> =0111001000111100011000000000000100001000110000001000000000000000
> |
> | 002 |
> 44854557232550
> |
> |     | Primary Account
> Number                                                 |
> | 003 |
> 003000
> |
> |     | Processing
> Code                                                        |
> | 004 |
> 000000001299
> |
> |     | Amount,
> Transaction                                                    |
> | 007 |
> 0904145241
> |
> |     | MMDDHHMMSS - Transmission date &
> time                                  |
> | 011 |
> 000096
> |
> |     | Systems Trace
> Number                                                   |
> | 012 |
> 145241
> |
> |     | HHMMSS - Time, Local
> Transaction                                       |
> | 013 |
> 0904
> |
> |     | MMDD - Date, Local
> Transaction                                         |
> | 014 |
> 1213
> |
> |     | YYMM - Date,
> Expiration                                                |
> | 018 |
> 5533
> |
> |     | Merchant
> type                                                          |
> | 019 |
> 0840
> |
> |     | country code, Acquiring
> institution                                    |
> | 032 |
> f0f0f0f0f000
> |