cancel
Showing results for 
Search instead for 
Did you mean: 

Question about file conversion in the sender file adapter

Former Member
0 Kudos

Hi, all.

I am trying to get the file adapter to parse a file. The message type is the following:

JOB

   Msg  0..1

      Transaction  0 ... unbounded

         Data   0 ... 1

            f1 string

            f2 string

How would you define the recordset name and recordset structure to produce the same structure in the converted xml. I tried:

recordset name : Msg

recordset structure : Data, *

But the transaction is missing. I tried:

recordset name: Msg

recordset structure : Transaction, *

Then the data is missing. Note that the actual data in f1, f2 ... are loaded successfully though.

Thanks,

Jonathan.

 


Accepted Solutions (1)

Accepted Solutions (1)

former_member184720
Active Contributor
0 Kudos

Hi Jon - It's not possible to have more then 3 levels using standard FCC.

Curious to know why do you need "Data" element under " Transaction " as the occurence it just  "0 ... 1"?

However for some reason if you would like to have it then you might have to create another intermediate mapping and handle it.

Former Member
0 Kudos

Hi, Hareesh

I agree. But that is how it is defined now by someone else. It is hard to change it as he defines the same structure on the receiving side. I didn't want to change the receiving structure as it touches the proxy code too. So I want to make something short and sweet.

Basically the data looks like this:

11,222

55,666

The result xml should be something like:

<JOB>

  <Msg>

     <Transaction>

        <DATA>

           11

           222

        </DATA>

     </Transaction>

     <Transaction>

        <DATA>

          55

          666

        </DATA>

      </Transaction>

  </MSG>

</JOB>

I know either the DATA has no meaning and it's giving me a headache ... but that's how it's done and I don't want to rock the boat too much. There are lots of mapping that I have changed otherwise.

Thanks,

Jonathan.

Former Member
0 Kudos

Can you share how you did the mapping for your example?

Thanks,

Jonathan.


former_member184720
Active Contributor
0 Kudos

Hi Jon - Then you can go for the intermediate mapping as i suggested.

Mapped the record -> record

Mapped the Node1 ->Transaction

Mapped the F1 anf F2 to Target F1 and F2

No mapping for Data as it's automatically gets created since the occurence is 1..1

Former Member
0 Kudos

Thanks. But is there a way in the file conversion to create the same format without introducing a second mapping?


former_member184720
Active Contributor
0 Kudos

I don't think so Jon. As i said, it only supports upto 3 levels.. the same if you use the messageTransformation bean too..

Either you have to write a custom module/java mapping/ Intermediate graphical mapping as suggested.

Among them i would prefer having the intermediate graphical mapping..

Former Member
0 Kudos

Thanks, Hareesh.

Answers (1)

Answers (1)

Former Member
0 Kudos

Hello,

Since u don't want to do any intermediate mapping and ur structure is very straight forward so i would suggest you to use JM and avoid FCC.

Thanks

Amit Srivastava

Former Member
0 Kudos

Thanks, Amit.

You are right that we can use java mapping too. But the go-live is one week from now and things aren't working. I am supposed to be there to help out and fix stuffs. I think I'll change the mapping for this release.