Skip to Content
avatar image
Former Member

JMS sender adapter not converting data to XML properly.

Hi,

I am using JMS adapter to read data from MQ. The length of each segment is fixed.

The problem is there is no new line character at the end of each segment .So JMS adapter is just reading the first line and not reading the rest.

What I found out that if I place a new line character at the end of each segment it works fine. But for me I have constraint that in MQ the source system cannot send a new line character at the end of each segment. So can any one tell me how can I solve this issue?

The sample data that I am getting from MQ is:

AA12345

BBXYZXY CC12300

CC456AS

We are using SP13.

The length of each segment is fixed.

Any help is appreciated

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • avatar image
    Former Member
    Oct 04, 2005 at 06:37 PM

    You need to use conversion module.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Oct 05, 2005 at 07:39 AM

    Hi Ravi,

    Thanks for your reply.

    But I have already the content conversion module in place. That's why it converts the MQ data in to XML format when there is a new line character after each segment. The problem is if there is no end of line character after each segment it just reads the first line and does not read further because it does not find the new line character.

    I need a way to get around it when the segments in MQ data do not have a new line character appended at the end of them.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Oct 05, 2005 at 08:10 AM

    Hi Abinash

    If you say the length is fixed, then you can use the fieldFixedLengths option in the module processor.

    cheers

    sameer

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Sameer,

      fieldFixedLengths is used to divide the data among the elements of a segment.

      For example if I have the segment structure like

      AA1234567

      BB12345

      BBXYZ12

      Then in the module processor we define

      xml.recordsetStructure NameA,1,NameB,*

      .

      xml.NameA.fieldNames MyKey,field-nameA

      xml.NameA.fieldFixedLengths 2,7

      .

      xml.NameA.fieldNames MyKey,field-nameB

      xml.NameB.fieldFixedLengths 2,5

      As per my understanding goes First it reads the first line till it finds a new line char and then it uses fieldFixedLength to assign data to the fields inside the segments. Here in the above example A1=AA and A2=1234567

      But I am not aware if we can use fieldFixedLength to identify the segment it self. If so then how can I use it can u let me know?

      Thanks