cancel
Showing results for 
Search instead for 
Did you mean: 

File Sender adapter with File content conversion

Former Member
0 Kudos

Hi

I'm having problems picking up a flat file that has some junk characters in the file.

I'm usign a file sender adapter with file content conversion. The adapters shows the following error-

Conversion of complete file content of to XML format failed around position 0: sun.io.MalformedInputException

this is the sample data with junk char's -

A20099201009999009999060815160505051700130008151vÿÿÿÿ³ r 0OK0476 31N016227241915840IV 00840 ÿÿÿ ÿ ÿÿÿÿÿÿÿÿ ÿ ÿÿÿ

There is not much in the file content conversion. This is a fixed length file, I'm just pickign it up & passing it to an inbound proxy. All my processing is in the proxy.

I'd appreciate any suggestions.

Thanks

Rachana

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Yes I am using File encoding UTF-8.

Should I do anything else to be able to accept the junk charaters?

Thanks

Rachana

former_member206604
Active Contributor
0 Kudos

Hi,

Try changing the Transfer mode to <b>Binary</b> instead of <b>Text</b>.

Thanks,

Prakash

bhavesh_kantilal
Active Contributor
0 Kudos

Rachna,

Like mentioned by others change the encoding in the file adapter to ISO-8859-1.

For how to do this, take a look at the sender fle adapter --> Processing Parameters --> File Type.

http://help.sap.com/saphelp_nw2004s/helpdata/en/e3/94007075cae04f930cc4c034e411e1/content.htm

Regards,

Bhavesh

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi Rachana,

This thread answers that question..

cheers,

Prashanth

P.S Please mark helpful answers

Former Member
0 Kudos

Thanks for all the suggestions.

I changed the file encoding in the to ISO-8859-1, but now there is a mapping error!

I'm not doing anythign with the data. Infact I'm using the same message type & passing the data to my inbound proxy. But I get a mapping exception -

com.sap.aii.utilxi.misc.api.BaseRuntimeException: Fatal Error: com.sap.engine.lib.xml.parser.ParserException: Invalid char #0x1(:main:, row:29, col:76), etc etc.

Should I change the datatype of that element which receives this from type "xsd:string" to something else? Will that help or is there anythign else I should do?

Thanks

Rachana

bhavesh_kantilal
Active Contributor
0 Kudos

Rachna,

If you are using the same message type as the source and target , you do not need any message mapping at all.

No Message and Interface Mapping needed. Rest of configuration will be the same.

Also, it looks like a mapping exception. Just make sure that the content conversion has produced the payload as per your requirements.

Regards,

Bhavesh

Former Member
0 Kudos

Hi Rachana,

As Mickael said, if they are indeed character sets of different countries, you could try using different encoding techniques specific to that country. If they are junk characters, I do not think it is possible to perform content conversion on them.

cheers,

Prashanth

Former Member
0 Kudos

Hi Rachana,

Do you use a specific "encoding" like UTF-8 or ISO-8859-1 in your Sender CC?

To be simple, Encoding is linked to country, you can find all "iso-nnnn" via google or some of them in sap help.

http://help.sap.com/saphelp_nw2004s/helpdata/en/e3/94007075cae04f930cc4c034e411e1/content.htm

Moreover, with your source file opened thanks to Notepad (for instance), use option "save UNDER", you will the encoding use by your file

Mickael