cancel
Showing results for 
Search instead for 
Did you mean: 

Complex content conversion in sender SOAP Adapter

pi_consultant1
Participant
0 Kudos

Dear friends,

I’ve a scenario where I have to user content conversion to transfer a text file to xml…


My incoming text file looks like this:

0001A051112xxxxxxxxxxxx011                    
0010B0006020698900001dol
0020London                         
0030B1051112XXXXXXXX                    T 
0100A000500000010190006020698900347840531        
0160AXXXXXXXXXXXXXXXXXXXXX                 
0160A                                            
0160A                                            
0170BA. Smith                                
0173London                                    
9990A00000000000010190009499104210000001         
9999A                                            

and the xml structure after content conversion must look like below:

My question is, Is it possible to create this multi hierarchal XML structure with MessageTransformBean?

if so can you please help me to achieve this?

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

<File>

<0001Header>

  </>

  </>

</0001Header>

<Batch> 1...N

  <0010>

   </>

   </>

  </0010>

  <0020>

   </>

   </>

  </0020>

  <0030>

   </>

   </>

  </0030>

  <Posts> 1..N

   <0100>

    </>

    </>

   </0100>

   <0110>

    </>

    </>

   </0110>

   <0113>

    </>

    </>

   </0113>

   <0150>

    </>

    </>

   </0150>

   <0160>

    </>

    </>

   </0160>

   <0170>

    </>

    </>  

   </0170>

   <0173>

    </>

    </>

   </0173>

  </Posts>

  <9990BatchClose>

   </>

   </> 

  </9990BatchClose>

</Batch>

    <9999HeaderClose>

  </>

  </>

</9999HeaderClose>

</File>

      

Kind regards,

John

Accepted Solutions (1)

Accepted Solutions (1)

stefan_grube
Active Contributor
0 Kudos

No, this is not possible.

Answers (1)

Answers (1)

nabendu_sen
Active Contributor
0 Kudos

Hi,

This is not possible through MessageTransformBean. You have to write Java code to manually achieve this requirement.