cancel
Showing results for 
Search instead for 
Did you mean: 

JMS sender adapter not converting data to XML properly.

Former Member
0 Kudos

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

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi Abinash

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

cheers

sameer

Former Member
0 Kudos

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

Former Member
0 Kudos

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.

Former Member
0 Kudos

HI Abhinash,

Try using these as End seperator '0x0D''0x0A'

Hope this fixes your issue,

Regards

Vishnu

Former Member
0 Kudos

Hi Vishnu,

you mean should I try using xml.endSeparator '0x0D'

Thanks

Former Member
0 Kudos

HI Abinash,

Yes, both of them together or seperately

Regards

Vishnu

Former Member
0 Kudos

How can I use together both of them

xml.endSeparator '0x0D''0x0A'

or

xml.endSeparator '0x0D"0x0A'

Former Member
0 Kudos

You need to use conversion module.