Skip to Content

How to generate a file containing substructure of inboud interface

Hi Experts,

My outbound interface structure is like below:

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

<ns0:File_Input xmlns:ns0="http:/training/POC">

<NUM1>1</NUM1>

<NUM2>2</NUM2>

</ns0:File_Input>

My inbound interface is like below:

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

<ns0:File_Output xmlns:ns0="http:/training/POC">

<Filename></Filename>

<Output>

<TOTAL>3</TOTAL>

</Output>

</ns0:File_Output>

This is FILE to FILE scenario.

The input (sender or outbound) file is XML. Output file is also XML but I want it to be:

<ns0:File_Output xmlns:ns0="http:/training/POC">

<Output>

<TOTAL>3</TOTAL>

</Output>

</ns0:File_Output>

I don't want the node <Filename> in the output XML file even though the inbound interface structure contains the node <Filename>. The output file name is dynamic and hence I am using the node <Filename>. I am populating this node in message mapping.

I tried File content conversion but it is not generating the file. I gave the following conversion values.

What am I doing wrong?

File_Output.fieldSeparator = nl

Output.fieldSeparator = nl

TOTAL.fieldSeparator = nl

Please help!

Thanks

Gopal

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • avatar image
    Former Member
    May 23, 2011 at 10:36 AM

    I think that the error is in paramaters value:

    File_Output.fieldSeparator = 'nl'

    Output.fieldSeparator = 'nl'

    TOTAL.fieldSeparator = 'nl'

    You need to include quotes

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hi Gopal.

      If you need xml file as an output,

      No File Content Conversion is required.

      Please change the Message protocol from FCC to File in the receiver communication Channel.

      Add code, as Ninu said, u are done.

      Thankyou

      Kiran

  • May 23, 2011 at 10:55 AM
    The output file name is dynamic and hence I am using the node <Filename>.

    instead of this use dynamic configuration to avoid such issues - /people/shabarish.vijayakumar/blog/2009/03/26/dynamic-configuration-vs-variable-substitution--the-ultimate-battle-for-the-file-name

    Add comment
    10|10000 characters needed characters exceeded