Skip to Content
author's profile photo Former Member
Former Member

Content Conversion in receiver channel

Hi all,

I have a proxy to FTP scenario with no mapping involved.Over proxy communication PI is receiving the data, I am creating the CSV file using content conversion in receiver channel and placing the file at FTP.

The file name is coming in one of the field of the input xml,I am using variable substitution and setting the file name from that particular field value.But as I don't want that node and file name element in my output file content, please guide me what parameters can I set in my content conversion to remove the FileNode from o/p csv file.

The sample input xml is

<MT>

<Record>

<Field1>1</Filed1>

<Field2>2</Filed2>

</Record>

<Record>

<Field1>3</Filed1>

<Field2>4</Filed2>

</Record>

<FileNode>

<FileName>InutFile</FileName>

</FileNode>

</MT>

I want output xml to be like

1,2

3,4

I have followed this blog /people/sravya.talanki2/blog/2005/08/11/solution-to-the-problem-encountered-using-variable-substitution-with-xi-sp12 to cut the FileNode, but it gives an error in cc parameters.

In my actual i/p payload,the Record is 0..unbounded and there are 50 sub elements inside Record element.

Please provide your inputs.

Thanks,

Ruchi

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Jul 14, 2011 at 12:23 PM

    Hi Ruchi,

    Also Add the below parameters.

    FileNode.fieldSeparator '0'

    FileNode.endSeparator '0'

    FileNode.fieldFixedLengths 0

    FileNode.fixedLengthTooShortHandling Cut

    FileNode.fieldNames FileName

    Your problem will be resolved.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jul 14, 2011 at 12:19 PM

    Hi Ruchi,

    Change your structure like this.

    MT>

    <Record>

    <Field1>1</Filed1>

    <Field2>2</Filed2>

    </Record>

    <Record>

    <Field1>3</Filed1>

    <Field2>4</Filed2>

    </Record>

    <FileNode>

    <FileName>InutFile</FileName>

    </FileNode>

    </MT>

    Dont put the filenode under Record.

    Also Add the below parameters.

    FileNode.fieldSeparator '0'

    FileNode.endSeparator '0'

    FileNode.fieldFixedLengths 0

    FileNode.fixedLengthTooShortHandling Cut

    FileNode.fieldNames FileName

    Now use the same parameter mentioned in the blog .Your problem will be resolved.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jul 14, 2011 at 12:20 PM

    Hi,

    Can you help provide error message that you era getting?

    Regards,

    Anurag

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.