cancel
Showing results for 
Search instead for 
Did you mean: 

Removing message type tag in output file

former_member192892
Active Contributor
0 Kudos

Hi guys,

I'm new to XI. I have done an xml file to xml file scenario. It is working successfully

The output file has a format

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

<ns0:mt_xml_receiver xmlns:ns0="http://xml2xml">

<DETAILS>

<ID>111</ID>

<NAME>Varun</NAME>

<LOCATION>India</LOCATION>

<ADD>Bangalore</ADD>

<MOBILE>46572727</MOBILE>

<EMAIL>varunmukund@gmail.com</EMAIL>

</DETAILS>

</ns0:mt_xml_receiver>

I want to remove the additional tag present for the message type and i want the output in the format

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

<DETAILS>

<ID>111</ID>

<NAME>Varun</NAME>

<LOCATION>India</LOCATION>

<ADD>Bangalore</ADD>

<MOBILE>46572727</MOBILE>

<EMAIL>varunmukund@gmail.com</EMAIL>

</DETAILS>

Can any one help me on how to achieve this???

Pl help me on this guys

Regards

Varun

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

HI Varun,

This will help you..

In the message type <b>mt_xml_receive</b>r there is a box where the namespace name is specified.

Simply delete the same and activate the message type.

In your case what you can do is as you dont want the message type name also.

you can create the message type name as DETAILS instead of mt_xml_receiver.

Regards,

Sumit

ps : reward points if tht helped u.

Former Member
0 Kudos

Hi Varun,

My earlier reply might be confusing..

Create Target message type and name it DETAILS.

In the target message type remove the namespace name.

Redo the mapping .

Save & Activate everything.

It will work without using any adapter module.

Regards,

Sumit

former_member192892
Active Contributor
0 Kudos

Hi Sumit,

I proccede with your steps and got the desired output

Thanks a lot dude...

I've given u 10 pts....

Varun

Answers (1)

Answers (1)

Former Member
0 Kudos

I believe using a file adapter module in the receiver adapter can do the trick

regards

krishna

former_member192892
Active Contributor
0 Kudos

Iam using a file adapter as the receiver...

But how to ignore that particular tag??

Former Member
0 Kudos

Hi,

In the receiver file adapter, you have an option to add a custom adapter module which will be the last step done in the IS pipeline before outbound processing (pushing to the target system). So, here in the receiver adapter module, you can write java code to filter the desired line and then set the result as output

regards

krishna