cancel
Showing results for 
Search instead for 
Did you mean: 

Unzip using Payloadzipbean/file content conversion

Former Member
0 Kudos

Experts,

I have a scnario, I get a zip file with .gz extension, unzip it read th file using file adapter.

I am using Payloadzipbean module to unzip(zip.mode = unzip).

The problem is File adapter converting the zip file into xml and unzipping the file.

How do I force File adapter to unzip first and do content conversion.

thanks

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Have you gone through this blog

/people/stefan.grube/blog/2007/02/20/working-with-the-payloadzipbean-module-of-the-xi-adapter-framework

Former Member
0 Kudos

That's the only blog on Payloadzipbean. It talks more about zipping. There is not much I can find on help.sap.com also.

stefan_grube
Active Contributor
0 Kudos

Use the MessageTransformBean to do the conversion and put this in the module chain after the PayloadZipBean.

Former Member
0 Kudos

I am still getting the same error, after transformation bean.

These are the steps from Adapter audit Log

1 Channel Interris_FileSender1: Entire file content converted to XML format

2 Send binary file "W_TK_Daily_546_08-OCT-06.csv.gz" from FTP server "ftp2.abc.com:\InteRRIS\dev", size 11373 bytes with QoS EO

3 Zip: unzipping payload

4 Transform: transforming the payload ...

5 Transform: using Transform.Class: $identity

6 Zip: successfully processed

7 Transform: successfully transformed

8 Application attempting to send an XI message asynchronously using connection File_http://sap.com/xi/XI/System.

9 Trying to put the message into the send queue.

10 Success Message successfully put into the queue.

the 1 st step is itself the proble. The zip file itself getting converted into xmal. I see all wierd characters similar to if you open zip file in textpad.

and it also shoes every step successful.

after content conversion, its trying to unzip, then message transformation, but i still see wierd characters. Where the zipped file or transformed message is going.

AF_Modules/PayloadZipBean

AF_Modules/MessageTransformBean

CallSapAdapter

Edited by: Gopal Janagama on May 6, 2008 3:19 PM

stefan_grube
Active Contributor
0 Kudos

Do not use the conversion of the file adapter channel. Use the conversion of the MessageTransformBean instead.

Former Member
0 Kudos

Thanks Stefan.

Now mapping is working. When I feed .ZIP files, everything is fine, but when I feed .gz files(gZip, UNIX) I am getting error while unzipping. Is there anyway, Payloadzipbean works with .gz files?

Edited by: Gopal Janagama on May 7, 2008 8:12 PM

Former Member
0 Kudos

Hi man.

How did you solve this. I have to pick up a zip file with a .txt file then I need to convert this file to xml with module MessageTransformBean but Im getting this error:

com.sap.aii.messaging.adapter.trans.TransformException: Error converting Message: 'sun.io.MalformedInputException'; nested exception caused by: sun.io.MalformedInputException

This is my structure

row (1..n)

-


>TRANSPORTES (1)

-


>ENTREGAS (1..n)

I have configured the module tag in this way:

AF_Modules/PayloadZipBean - zip

AF_Modules/MessageTransformBean - transform

CallSapAdapter - 0

zip - zip.mode - unzip

transform - Transform.Class - com.sap.aii.messaging.adapter.Conversion

transform - xml.ENTREGAS.endSeparator - 'nl'

transform - xml.ENTREGAS.fieldFixedLengths - 1,30

transform - xml.ENTREGAS.fieldNames - TIPO,NUM_ENTREGA

transform - xml.ENTREGAS.keyFieldValue - E

transform - xml.TRANSPORTES.endSeparator - 'nl'

transform - xml.TRANSPORTES.fieldFixedLengths - 1,30

transform - xml.TRANSPORTES.fieldNames - TIPO,NUM_TRANSPORTE

transform - xml.TRANSPORTES.keyFieldValue - T

transform - xml.keyFieldType - CaseSensitiveString

transform - Transform.ContentType - text/plain;charset=utf-8

transform - xml.conversionType - StructPlain2XML

transform - xml.documentName - MPrueba_Zip

transform - xml.documentNamespace - http:/XXXXXX.es/XXXX/sap/prueba

transform - xml.keyFieldName - TIPO

transform - xml.processFieldNames - fromConfiguration

transform - xml.recordsetName - row

transform - xml.recordsetStructure - TRANSPORTES,1,ENTREGAS,*

If I use only the MessageTransformBean directly from .txt everything works ok!!!

What am I doing wrong???

Thanks a lot!!!

Answers (0)