on 07-14-2011 1:16 PM
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
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The error encountered in channel is "Conversion initialization failed: java.lang.Exception: java.lang.Exception: Error(s) in XML conversion parameters found: Parameter 'FileNode.fieldFixedLengths' or 'FileNode.fieldSeparator' is missing "
I have tried putting the FileName element inside Record and using the same parameters, but even then it gave the above error.
and actually I dont want to put the FileName element inside Record Element because the Record will repeat approx 500 times, so the FileName column will repeat 500 times with the same value.want to avoid that, thats why put it outside Record element.
Thanks,
Ruchi
Hi Ruchika,
As i mentioned in my earlier reply Please add the below parameter and your problem will be resolved
File name should be outside of record. Your current structure is correct. only add the parameters.
FileNode.fieldSeparator '0'
FileNode.endSeparator '0'
FileNode.fieldFixedLengths 0
FileNode.fixedLengthTooShortHandling Cut
FileNode.fieldNames FileName
Hi,
Can you help provide error message that you era getting?
Regards,
Anurag
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
10 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.