cancel
Showing results for 
Search instead for 
Did you mean: 

File Content Conversion in Sender Adapater

Former Member
0 Kudos

Hi Folks ,

I am doing a file 2 file scneario using content conversion at both end

My i/p and o/p is file is tab delimited

My source xml structure is

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

<ns0:file_sender_mt xmlns:ns0="urn:filetofiledemo">

<recordset>

<data1>

<keyfield/>

<age1/>

</data1>

<data>

<name/>

<keyfield/>

<age/>

<loc>

<keyfield/>

</loc>

</data>

</recordset>

</ns0:file_sender_mt>

Data and location have the mapping 1.. unbounded

while data1 has the mapping 1.1

When I am trying to read it as a tab delimited flat file.

These are the parameters that i have set

Document Name file_sender_mt

Document Namespace urn:filetofiledemo

Recordset Name recordset

Recordset Structure data1,1,data, ,loc,

Key Field Name keyfield

data1.fieldNames keyfield,age1

ignoreRecordsetName true

recordset.fieldSeparator '0'

data1.fieldSeparator '0x09'

data1.keyFieldValue 01

data1.endSeparator '0'

data.beginSeparator '0x09'

data.fieldSeparator '0x09'

data.fieldNames name,keyfield,age

data.keyFieldValue 02

loc.fieldSeparator '0x09'

loc.beginSeparator '0x09'

loc.endSeparator '0'

loc.keyFieldValue 03

loc.fieldNames keyfield

My file is getting picked up . I dont see any message in message monitoring and neither anything in moni .

No error in adapater

but the file is not getting created .

if i change the message protocol to file and send t above xml file . the scneario works fine

any reasons for the above behaviour

Thanks

Amit

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi Amit,

I am facing the same problem.In my adapter monitoring I am able to see that my Sender Communication channel is showing green and the file is polled.But I am unable to receive my messages in the receiver.I have even checked up with moni,no messages are displayed as per my interface.

And One more thing,even I am handling tab delimeted file is compulsary that,we must handle the

recordset.fieldSeparator '0'

data1.fieldSeparator '0x09' in my content conversion.

I doubt in this,becuase I am handling FieldfixedLenghts.

If you have solved your problem.Please can you guide me.

Everything is fine.When I am sending an XML file.If there are any mistakes with Content conversion with my tab delimeted file than,some error must be shown in my Adapter monitoring showing my communication channel error.

Thank You,

KishoreJ.

Former Member
0 Kudos

no buddy. no luck as of now

in case you have solved the problem plz do let me know

thks

amit

Former Member
0 Kudos

Hi Guys ,

Any upadates on how we cld solve this isssue

Thanks

Amit

Former Member
0 Kudos

I have a similar issue:

If the input file is XML , File to File conversion works fine. But If I use Flat File and content conversion on sender side, the File to File Conversion is failing. The file is getting picked up but the mapper can not produce target element. Mapping works fine in Test Mode within Repository

I am on XI 3.0 SP09

Any help is appreciated

PM

Former Member
0 Kudos

Hey,

There has to be some issues with the content conversion.

when u give

ignoreRecordsetName true

the recordset tag will be ignored from the XML So when u give

recordset.fieldSeparator '0'

there is no recordset and y does it require a field Separator.

So y don u try without

<b>recordset.fieldSeparator '0'</b>

cheers

jithesh

Former Member
0 Kudos

Amit,

While using csv what is the adapter status? Any error msgs? Try giving the processing mode as delete and make sure ur i/p file is getting picked up.

Regards,

Jai Shankar.

Former Member
0 Kudos

Hi Jai,

yes my processing mode is delete and my i/p fiel is getting picked up .

Adapater status is green . no error message

Thanks

Amit

Former Member
0 Kudos

Hi Amit,

I think this is the FCC you are trying to do:

/people/shabarish.vijayakumar/blog/2006/02/27/content-conversion-the-key-field-problem

Please can you check for any inconsistencies

Regards

vijaya

Former Member
0 Kudos

Hi Vijaya,

yes i refered the blog and followed the same while doing it.

I dont find any thing different

thanks

Amit

Former Member
0 Kudos

hi,

my ip file is

01 age1 amit 02 25 03

and i am geting the folowing error in adapater

Sender Adapter v2723 for Party '', Service 'filetofile_bs':

Configured at 2006-08-04 10:27:20 UTC

History:

- 2006-08-04 10:28:00 UTC: Retry interval started. Length: 10.000 s

- 2006-08-04 10:28:00 UTC: Error: Conversion of complete file content to XML format failed around position 0: Exception: ERROR converting document line no. 1 according to structure 'data1':java.lang.Exception: ERROR in configuration: more elements in file csv structure than field names specified!

- 2006-08-04 10:28:00 UTC: Processing started

- 2006-08-04 10:27:50 UTC: Error: Conversion of complete file content to XML format failed around position 0: Exception: ERROR converting document line no. 1 according to structure 'data1':java.lang.Exception: ERROR in configuration: more elements in file csv structure than field names specified!

- 2006-08-04 10:27:50 UTC: Processing started

thanks

Amit

Former Member
0 Kudos

More supprisngly

when i give ip file as

01, age1, amit, 02, 25, 03

which is wrong since my file is tab deliemited

i dont get error in adapater bt no o/p

bt if i give file as tab delimited

i get error in adapater

thanks

amit

Former Member
0 Kudos

Hey,

when u give as

<i>>>01 age1 amit 02 25 03</i>

according to ur content conversion parameter it will search for keyFeidl 01 and takes the recordline and assings it to data1 which has only 3 field where the record line has more then one field.

thats y it throws the error

'data1':java.lang.Exception: ERROR in configuration: more elements in file csv structure than field names specified!

so give the input file as

01 age1 amit(tab separated)

02 25(tab separated)

03

and give the endSeparator as 'nl'

it should solve ur problem

cheers

jithesh

Former Member
0 Kudos

Hi,

isn't you file supposed ot be

01, age1, amit

02, 25, 03

03, 1

Regards

Vijaya

Former Member
0 Kudos

I have found you cant use nested element in sender adapater

so i have chnage my source structure to

Now if i give my i/p file as

01 age1

02 25 03

file is getting pciked up

bt if i give it as

01 age1 02 25 03

which is the structure i expect my i/p file it is failing to read with the error

Error: Conversion of complete file content to XML format failed around position 0: Exception: ERROR converting document line no. 1 according to structure 'data1':java.lang.Exception: ERROR in configuration: more elements in file csv structure than field names specified!

Does The special character ´0´ is not a separator character.

not work for sender adapater bcoz in reciever i am able to get o/p in one line and tab delimited

any idea

and since i have given my keyfield as the second field in data

02 would come at the second palce

Thanks

Amit

Former Member
0 Kudos

Hi Amit,

Any success?

Regards,

Jai Shankar.

Former Member
0 Kudos

No sucess buddy

if i put the values of data1 and data on 2 lines

file is picked up

but not when the values are on a single line

Thanks

a,it

Former Member
0 Kudos

Hi jitesh

The ip file from my client would have values in one line

so i cant give it as

01 age1

amit 02 25 03

When i give my i/p file as above it is picked up

To avoid going to next line

i have given

data1.endSeparator '0'

but it does not seem to work

my i/p file has to be in one line

and i need 2 elements . (data1 and data)

since data would be repeat more than once and datai wld always come once

thanks

amit

Former Member
0 Kudos

Could you kindly provide any imputs

i need to read mutltiple elements on a single line

has any one faced this problem before

On reciever adaapter i am able to get o/p on single line

bt on the sender adapater it is failing if i give all the values on a single line