Message header problem

113 views
Skip to first unread message

venkat

unread,
Jul 13, 2011, 12:37:15 AM7/13/11
to jPOS Users
Hi,

Host server is not processing the messages which are sending by my
client environment, due to missing the header value in message.

I am sending "0200" type messages.I have configured messages as xml
files and placed in data\AGENT folder.
I have configured Base24Channel and Base24Packager in channel.xml file
and placed in deploy folder at client side.
And using XMLPackager in client program to unpack the xml configured
message to ISOMsg.

Can any body tell, how to set the header content in message and what
could be the header contents ?
Is message header varies by message type or channel type ?



Thank you
Venkat.

Mark Salter

unread,
Jul 13, 2011, 2:36:58 AM7/13/11
to jpos-...@googlegroups.com
On 13/07/2011 05:37, venkat wrote:
> Hi,
>
> Host server is not processing the messages which are sending by my
> client environment, due to missing the header value in message.
Are you setting a header value?

> Can any body tell, how to set the header content in message and what
> could be the header contents ?

isomsg.setHeader(value)

For the contents you will need to check with the administrators of the
system you are connecting to.

Have you got the Programmers Guide yet? It will help you to solve this
sort of 'problem'.

8)

> Is message header varies by message type or channel type ?

See above, it could be either or both.


--
Mark

Venkateswarlu

unread,
Jul 13, 2011, 5:36:43 AM7/13/11
to jpos-...@googlegroups.com
Thanks for reply..

On Wed, Jul 13, 2011 at 12:06 PM, Mark Salter <marks...@talktalk.net> wrote:
On 13/07/2011 05:37, venkat wrote:
>> Hi,
>>
>> Host server is not processing the messages which are sending by my
>> client environment, due to missing the header value in message.
>Are you setting a header value?
I am not setting header value.
 
>> Can any body tell, how to set the header content in message and what
>> could be the header contents ?
>isomsg.setHeader(value)
   I have tried to set header content by using API method from ISOMsg class as you given here.
  
   String headerValule = "0000006F";
   BaseHeader header = new BaseHeader(headerValule.getBytes());
   m.setHeader(header);

   I have understood that header value contains the message length. So i have calculated message length by adding all fields lengths and setting its   hexa value(0000006F) as header. Please correct me if mu understanding is wrong.
Host server is throwing following error
<log realm="channel/192.168.1.60:2302" at="Wed Jul 13 14:57:04 IST 2011.753" lifespan="1016ms">
  <receive>
    <iso-exception>
      org.jpos.iso.IFA_LLLCHAR: Problem unpacking field 46 (java.lang.ArrayIndexOutOfBoundsException: 147) unpacking field=46, consumed=139
      org.jpos.iso.ISOException: org.jpos.iso.IFA_LLLCHAR: Problem unpacking field 46 (java.lang.ArrayIndexOutOfBoundsException: 147) unpacking field=46, consumed=139
        at org.jpos.iso.ISOBasePackager.unpack(ISOBasePackager.java:261)
        at org.jpos.iso.ISOMsg.unpack(ISOMsg.java:416)
        at org.jpos.iso.BaseChannel.unpack(BaseChannel.java:903)
        at org.jpos.iso.BaseChannel.receive(BaseChannel.java:671)
        at org.jpos.iso.ISOServer$Session.run(ISOServer.java:130)
        at org.jpos.util.ThreadPool$PooledThread.run(ThreadPool.java:71)
    </iso-exception>
 

>For the contents you will need to check with the administrators of the
>system you are connecting to.

>Have you got the Programmers Guide yet?  It will help you to solve this
>sort of 'problem'.
   Yes, i am having jPosGuide.pdf, but i could get info from this document.

8)

> Is message header varies by message type or channel type ?

>See above, it could be either or both.


--
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-users+...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/jpos-users

Mark Salter

unread,
Jul 13, 2011, 6:13:29 PM7/13/11
to jpos-...@googlegroups.com
On 13/07/2011 10:36, Venkateswarlu wrote:
> Thanks for reply..
>
> On Wed, Jul 13, 2011 at 12:06 PM, Mark Salter <marks...@talktalk.net>wrote:
>
>> On 13/07/2011 05:37, venkat wrote:
>>>> Hi,
>>>>
>>>> Host server is not processing the messages which are sending by my
>>>> client environment, due to missing the header value in message.
>>> Are you setting a header value?
>> I am not setting header value.
What system is your target host/server?

In your reply below is based on jPOS, are you in control of both the
client and the server?

Do both ends know about the header?

Is there another different host, with documentation?


>>
>
>
>> >> Can any body tell, how to set the header content in message and what
>>>> could be the header contents ?
>>> isomsg.setHeader(value)
>>
> I have tried to set header content by using API method from ISOMsg class
> as you given here.
>
> String headerValule = "0000006F";
> BaseHeader header = new BaseHeader(headerValule.getBytes());
> m.setHeader(header);
>

Does this header format and content match the needs of your target host
system specification?


> I have understood that header value contains the message length.

No, the header is distinct from the length of the message (which is
taken care of by the Channel), the Header usually follows the length and
precedes the message on the wire (Section 2.3 in guide)

> So i
> have calculated message length by adding all fields lengths and setting
> its hexa value(0000006F) as header. Please correct me if mu understanding
> is wrong.

It is wrong, the Channel calculates and handles any length for you.

Please consider the length as distinct from the header, if it only a
length you need, simply choose or create the right Channel.

> Host server is throwing following error
> <log realm="channel/192.168.1.60:2302" at="Wed Jul 13 14:57:04 IST 2011.753"
> lifespan="1016ms">
> <receive>
> <iso-exception>
> org.jpos.iso.IFA_LLLCHAR: Problem unpacking field 46
> (java.lang.ArrayIndexOutOfBoundsException: 147) unpacking field=46,
> consumed=139
> org.jpos.iso.ISOException: org.jpos.iso.IFA_LLLCHAR: Problem unpacking
> field 46 (java.lang.ArrayIndexOutOfBoundsException: 147) unpacking field=46,
> consumed=139
> at org.jpos.iso.ISOBasePackager.unpack(ISOBasePackager.java:261)
> at org.jpos.iso.ISOMsg.unpack(ISOMsg.java:416)
> at org.jpos.iso.BaseChannel.unpack(BaseChannel.java:903)
> at org.jpos.iso.BaseChannel.receive(BaseChannel.java:671)
> at org.jpos.iso.ISOServer$Session.run(ISOServer.java:130)
> at org.jpos.util.ThreadPool$PooledThread.run(ThreadPool.java:71)
> </iso-exception>
>

This server's Channel perhaps doesn't know about the header, how is it
setup/configured?

Is this a test server in place of a 'real' target host?

If there is a 'real' target host, have you confirmed the header format
expected with the owners?


>
>>
>>> For the contents you will need to check with the administrators of the
>>> system you are connecting to.
>>
>>> Have you got the Programmers Guide yet? It will help you to solve this
>>> sort of 'problem'.
>>
> Yes, i am having jPosGuide.pdf, but i could get info from this document.
>

It is there (Section 2.3, Chapter 6) and scattered through, I would hope
with enough detail to get you going. Certainly there have been numerous
previous discussions on this list too.

Which version of the guide do you have?


--
Mark

Reply all
Reply to author
Forward
0 new messages