cancel
Showing results for 
Search instead for 
Did you mean: 

Content conversion at receiver side

Shabarish_Nair
Active Contributor
0 Kudos

Hi all,

suppose i have a xml generated by XI as follows:

<?xml version="1.0" encoding="UTF-8" ?>

<ns:MT_OUTPUT xmlns:ns="http://test">

<FILE_HEADER>

<RECORD_TYPE>01</RECORD_TYPE>

<FILE_DATE>290405</FILE_DATE>

<FILE_NUM>00001</FILE_NUM>

</FILE_HEADER>

<BATCH_CONTROL_HEADER>

<RECORD_TYPE>02</RECORD_TYPE>

<BATCH_NUM>37510</BATCH_NUM>

</BATCH_CONTROL_HEADER>

<TRANSACTION>

<RECORD_TYPE>03</RECORD_TYPE>

<BILL_TYPE>11</BILL_TYPE>

<TRANSACTION_TYPE>05</TRANSACTION_TYPE>

</TRANSACTION>

<BATCH_TRAILER>

<RECORD_TYPE>04</RECORD_TYPE>

<BATCH_NUM>37517</BATCH_NUM>

</BATCH_TRAILER>

<FILE_TRAILER>

<RECORD_TYPE>05</RECORD_TYPE>

<TOTAL_NUMBER_RECORDS>00311</TOTAL_NUMBER_RECORDS> </FILE_TRAILER>

<FLAG>

<SET>1</SET>

</FLAG>

</ns:MT_OUTPUT>

<b>Now i dont want the flag to be resulted in my output file that i create.</b>

I.E i need to ignore the whole of the following:

<FLAG>

<SET>1</SET>

</FLAG>

In my receiver file adapter i have specified in the content conversion as follows:

recordset structure :

FILE_HEADER,BATCH_HEADER,TRANSACTION,BATCH_TRAILER,FILE_TRAILER

and then i have specified fieldnames, endseparator and fixedfieldlengths for the same.

but my adapter throws an error as follows:

Receiver Adapter v1319 for Party '', Service 'TEST':

Configured at 12:04:40 2005-05-24

Last message processing started 12:20:34 2005-05-24, Error: Message processing failed with java.lang.Exception: Exception in XML Parser (format problem?):'java.lang.Exception: Message processing failed in XML parser: 'Conversion configuration error: Unknown structure 'FLAG' found in document', probably configuration error in file adapter (XML parser error)'

Any suggestions ?

Regards,

ShabZ

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi Moorthy

I have tried the same parameters, it is still giving the same output. :-(..

I dont know whether the content conversion will handle nested deep structure or not.

Regards

Andy

Former Member
0 Kudos

Hi Shabarish

Did you get to resolve this situation ?

Becasue i am facing the same problem. IF you have got any solution please let me know.

Regards

Andy

Former Member
0 Kudos

Can you supress the segment coming out of your mapping? ie don't map it? If the segement is unneeded - why generate it?

Shabarish_Nair
Active Contributor
0 Kudos

Hi Amanda,

well, its a very important field for me

My receivers are determined based on that field.

If the flag is set it goes to a receiver A else to B.

So i indeed need to map the field

ShabZ

Former Member
0 Kudos

thinking....

Well - you could put the condition inside a BPM, determine your path, and ultimately your receiver in BPM... but that introduces other issues... (ie sequence, performance..)

Let me keep reading... there is a whole lot more documentation on Sender conversion than receiver- but maybe we can find something...

Former Member
0 Kudos

can you have a blank line?

If you specify the fixed length(s) of the fields on that segment to be 0, you just get a blank line...

Shabarish_Nair
Active Contributor
0 Kudos

yeah that sounds to be a good one.

well, actually we had set the flag to a blank space and then had written it. So anyway towards the end, a blank line is what we get ....

Thanx again !!

Regards,

Shabarish

Shabarish_Nair
Active Contributor
0 Kudos

Hey Amanda,

if i have my resulting structure as follows from XI:

<?xml version="1.0" encoding="UTF-8" ?>

<ns18:MT_OUTPUT_EXP xmlns:ns18="http:test/ShabzReign">

<FILE_CONTROL_HEADER>

<RECORD_TYPE>01</RECORD_TYPE>

<FILE_NAME>1</FILE_NAME>

<FILE_DATE>1</FILE_DATE>

<FILE_NUM>1</FILE_NUM>

</FILE_CONTROL_HEADER>

<b><BATCH_CONTROL_HEADER></b>

<RECORD_TYPE>02</RECORD_TYPE>

<BATCH_NUM>1</BATCH_NUM>

<BATCH_DATE>1</BATCH_DATE>

<i><TRANSACTION></i>

<RECORD_TYPE>03</RECORD_TYPE>

<AGREEMENT_NUMBER>1</AGREEMENT_NUMBER>

<AMOUNT>1</AMOUNT>

<BILL_TYPE>1</BILL_TYPE>

<i> </TRANSACTION></i>

<i><BATCH_TRAILER></i>

<RECORD_TYPE>04</RECORD_TYPE>

<BATCH_NUM>1</BATCH_NUM>

<i> </BATCH_TRAILER></i>

<b></BATCH_CONTROL_HEADER></b>

<BATCH_CONTROL_HEADER>

<RECORD_TYPE>02</RECORD_TYPE>

<BATCH_NUM>2</BATCH_NUM>

<BATCH_DATE>2</BATCH_DATE>

<TRANSACTION>

<RECORD_TYPE>03</RECORD_TYPE>

<AGREEMENT_NUMBER>2</AGREEMENT_NUMBER>

<AMOUNT>2</AMOUNT>

<BILL_TYPE>2</BILL_TYPE>

</TRANSACTION>

<BATCH_TRAILER>

<RECORD_TYPE>04</RECORD_TYPE>

<BATCH_NUM>2</BATCH_NUM>

</BATCH_TRAILER>

</BATCH_CONTROL_HEADER>

<FILE_TRAILER>

<RECORD_TYPE>05</RECORD_TYPE>

<TOTAL_NUMBER_RECORDS>3</TOTAL_NUMBER_RECORDS> </FILE_TRAILER>

</ns18:MT_OUTPUT_EXP>

that is

Header

Batch_header

|_

|_Transaction

|_Batch_trailer

Trailer

Can you help me with content conversions in such a scenario at the receiver side.Been trying with lotsa combinations but still no luck.

the output of file, we expect on the receiever sud look like...

header

batch_header1

transaction1

batch_trailer1

batch_header2

transaction2

batch_trailer2

---

---

---

trailer

Regards,

ShabZ

Former Member
0 Kudos

sure, what's the error you're getting? I'm assuming you have defined the structures of all 4 segments you have (batch header, transaction, batch trailer, trailer)... what doesn't it like?

Shabarish_Nair
Active Contributor
0 Kudos

well i gave in my recordset structure the following:

FILE_CONTROL_HEADER,BATCH_CONTROL_HEADER,

TRANSACTION,BATCH_TRAILER,FILE_TRAILER

then

FILE_CONTROL_HEADER.fieldNames .......

FILE_CONTROL_HEADER.fieldSeparator ,

FILE_CONTROL_HEADER.endSeparator 'nl'

and so on for all of them.....

but the output comes as ...

01,........

02,........,03,........

04,.........

02,........,03,........

04,.........

05,.........

but what we expect is

01,........

02,........

03,........

04,.........

02,........

03,........

04,.........

05,.........

I even tried mentioning

FILE_CONTROL_HEADER.keyFieldValue "01"

BATCH_CONTROL_HEADER.keyFieldValue "02"

TRANSACTION.keyFieldValue "03"

BATCH_TRAILER.keyFieldValue "04"

FILE_TRAILER.keyFieldValue "05"

But in vain ......

Is it because the output structure created by XI has levels in it

For Ref:

Header

Batch_header

|_

|_Transaction

|_Batch_trailer

Trailer

Any ideas ???

Regards,

ShabZ

Former Member
0 Kudos

I think it's the way your structure is nested - how 3 & 4 are underneath 2 - and it doesn't handle it well. I am guessing you set it up that way b/c of the way it's used in mapping - but content conversion only handles one structure after another, not nesting...

For fun - send a data file to your destination adapter w/o transaction & batch trailer nested inside batch header - and it will come out correctly. Not sure if you can adjust your structure & mapping to accomodate content conversion, but unfortunately that's the way it works. Some people will read this & tell you to do your content conversion yourself with a custom module... Doesn't really make us happy here, either, but sometimes the product just doesn't do what you expect.

Trying to think if there's a way to fix your structure by running it thru a second map to un-nest it...

Shabarish_Nair
Active Contributor
0 Kudos

yeah it is indeed the nested structure that is driving the nail down me

The story started when i tried to do a mapping program to get an exact replica of source structure at the target.

The input file was of the stucture as follows:

<b>01 ....</b>

<i>02 ....

03 ...

03 ....

03 ....

04 ....</i>

02 ....

03 ....

...

...

04 ....

...

...

...

<b>05 .....</b>

I did the content conversion at the receiver side

and was successful enough to get the XML in the same format as that of the input.

My DT was

DT_XXX

|_header

|_bheader ->>(unbounded)

|_body ->>(unbounded)

|_btrailer ->>(unbounded)

|_trailer

Now my target structure is the exact replica of the source structure but with the addition of an extra field called flag.

DT_YYY

|_header

|_bheader

|_body

|_btrailer

|_trailer

|_flag

but after mapping my output becomes,

01...

02...

02...

02..

....

03...

03...

..

...

04...

04...

04...

..

..

05....

So then i thought of a nesting structure at the target side, and it gave me a desired XML output (eg. the XML in the start of this thread).... but thats where content conversion fails !!!

M still tryin a lot of permutations and combinations here .... and all of them seems to give me pretty wierd results