on 08-31-2011 10:47 AM
Hi,
I have a source flat file (file to proxy) with following format with carriage return at the end of the file.
0003012835
6 New employees
0 Employees left
TRUE
The file will only have 4 lines. (5 with carriage return) and they don't repeat)
and the structure which I created in Data type is:
MT_EMP:
EMP_COUNT:
Record:
Org_Id
No.of.New.Employees
No.of.Employees.left
Successful_upload
I am giving the content conversion as:
Document Name: MT_EMP
Document namespace: http://xxxx
Recordset Name: EMP_COUNT
Record Structure: Record,*
Recordset Sequence: Ascending
Record.fieldFixedLengths: 10,22,23,22,7
Record.fieldNames: Org_Id,No.of.New.Employees,No.of.Employees.left,Successful_upload
Record.endSeparator 'nl'
Record.lastFieldsOptional: YES
And I am getting the xml file as:
<?xml version="1.0" encoding="utf-8" ?>
- <ns:MT_EMP xmlns:ns="http://www.emp_details">
- <EMP_COUNT>
- <Record>
<Org_Id>0003012835</Org_Id>
</Record>
- <Record>
<Org_Id>6 New employ</Org_Id>
</Record>
- <Record>
<Org_Id>0 Employee</Org_Id>
</Record>
- <Record>
<Org_Id>0 TRUE</Org_Id>
</Record>
<Record />
</EMP_COUNT>
</ns:MT_EMP>
Only the first field is getting populated again and again which is "Org_Id" and not getting other fields
but I want the xml like this:
<?xml version="1.0" encoding="utf-8" ?>
- <ns:MT_EMP xmlns:ns="http://www.emp_details">
- <EMP_COUNT>
- <Record>
<Org_Id>0003012835</Org_Id>
<No.of.New.Employees>6 New employees</No.of.New.Employees>
<No.of.Employees.left>0 Employees left</No.of.Employees.left>
<Successful_upload>TRUE</Successful_upload>
<Record />
</EMP_COUNT>
</ns:MT_EMP>
Where is my config doing?
Please help!
Thank you.
Hi Ramesh,
try to not use points (.) in field names.
Fabio
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
MAy be my structure in the data type is incorrect.
How would you define the structure for a simple flat file containing 4 fields each in separate lines? No headers, just the data with carriage return.
0010012345 (say .. employer number)
abc (say.. previous company)
efg (say..present company)
test_success (say ... status)
And what would be your content conversion?
Many thanks.
try this:
Record.fieldNames: Org_Id,No.of.New.Employees,No.of.Employees.left,Successful_upload
Record.fieldSeparator 'nl'
Record.lastFieldsOptional: YES
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Amitsri,
I tried it and now entire fields are displayed, but still only one field name for different values.
<?xml version="1.0" encoding="utf-8" ?>
- <ns:MT_EMP xmlns:ns="http://www.emp_details">
- <EMP_COUNT>
- <Record>
<Org_Id>0003012835</Org_Id>
</Record>
- <Record>
<Org_Id>6 New employees</Org_Id>
</Record>
- <Record>
<Org_Id>0 Employees left</Org_Id>
</Record>
- <Record>
<Org_Id>0 TRUE</Org_Id>
</Record>
<Record />
</EMP_COUNT>
</ns:MT_EMP>
Any more thoughts mate?
Thanks.
Hi Ramesh,
Try update your Record Structure to EMP_COUNT,1,Record,*
Regards,
Jenny
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ramesh,
Try to give field names in quote which may help:
Record.fieldNames: 'Org_Id','No.of.New.Employees','No.of.Employees.left','Successful_upload'.
Thanks,
RK
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
76 | |
9 | |
8 | |
7 | |
6 | |
5 | |
5 | |
5 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.