cancel
Showing results for 
Search instead for 
Did you mean: 

Sender File Zip

Former Member
0 Kudos

Hi guys.

I have to pick up a file. This file is zipped.

Could I pick the zip up, unzip it ant process the file with content conversion?

Thanks a lot.

Regards.

Accepted Solutions (1)

Accepted Solutions (1)

Shabarish_Nair
Active Contributor
0 Kudos

make use of these blogs

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

/people/michal.krawczyk2/blog/2007/02/08/xipi-command-line-sample-functions

Answers (2)

Answers (2)

prateek
Active Contributor
0 Kudos

Don't use FCC. Use MessageTransformBean instead and PayloadZipBean.

Regards,

Prateek

Former Member
0 Kudos

And how Could I get this with MessageTransformBean??

Thanks a lot!!!!

Shabarish_Nair
Active Contributor
0 Kudos

>

> And how Could I get this with MessageTransformBean??

>

> Thanks a lot!!!!

use the payloadzipbean to unzip the file, then use the messagetransformbean to do your FCC. you will find the documentation of the bean here.

http://help.sap.com/saphelp_nwpi71/helpdata/en/57/0b2c4142aef623e10000000a155106/content.htm

prateek
Active Contributor
Former Member
0 Kudos

Hi everybody!!!

Im using PayloadZipBean and then MessgeTransformBean to transform text to xml but Im gettin this message:

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

If I delete the PayloadZipBean module and I just use the MessgeTransformBean using a .txt file instead a .zip file works ok!!!

What am I doing wrong??

Thanks a lot!!!!

Edited by: Christian Abad Chico on May 13, 2010 6:05 PM

former_member181962
Active Contributor
0 Kudos

Hi,

You can try using only the PayloadZipBean in your adapter and see if you are able to just Unzip it.

This way you can isolate the error with respect to the adapter modules.

If you get the same error when you just use the PayloadZipBean, that mean you are doing something wrong in the way you are configuiring the adapter module.

Regards,

Ravi Kanth talagana

Former Member
0 Kudos

In the log details I can see the process of unzipping is done succesfully....

prateek
Active Contributor
0 Kudos

What are your module parameters?

Regards,

Prateek

former_member181962
Active Contributor
0 Kudos

Hi,

Did you see any special characters in the unzipped file?

It may have unzipped correctly, but it might have inserted any special characters.

I don't think we have access to the payload after the unzip in your scenario.

Thats the reason, you can have scenario with only the PayloadZipBean and see the output and compare with your normal unzipped file.

Regards,

ravi

Former Member
0 Kudos

ROW (1..n)

-


>TRANSPORTES (1)

-


>ENTREGAS (1..n)

I have configured the module tag lin this way:

AF_Modules/PayloadZipBean - zip

AF_Modules/MessageTransformBean - transform

CallSapAdapter - 0

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,*

Thank u so much!!!

Edited by: Christian Abad Chico on May 13, 2010 6:31 PM

Former Member
0 Kudos

Can you change recordsetName to Uppercase

transform - xml.recordsetName - ROW

Former Member
0 Kudos

hi

You havent include the zip modules parameters,

zip.mode --- unzip

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

Regards

Ramg

Edited by: Ramkumar Ganesh on May 13, 2010 6:37 PM

Former Member
0 Kudos

Sorry I had forgotten to add it in this threat.

This is the right configuration I have!!!

row (1..n)

-


>TRANSPORTES (1)

-


>ENTREGAS (1..n)

I have configured the module tag lin 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,*

Thanks everybody!!!

GabrielSagaya
Active Contributor
0 Kudos

Try to change the encoding option like UTF-8 or ISO-8859-1 in your Sender CC!!!

Former Member
0 Kudos

Ive tried this too!!! But it doen' t work!!!!

Im getting crazy!!!!!

stefan_grube
Active Contributor
0 Kudos

> Try to change the encoding option like UTF-8 or ISO-8859-1 in your Sender CC!!!

No! This will corrupt your zip file!

Use file type = binary.

It could be an encoding issue.

What encoding has the file inside the zip?

Are there special (non-ascii) characters inside?

Former Member
0 Kudos

Hi Stefan

The .txt file inside the zip does not have any non-ascii characters and the file is encoded in UTF-8.

The weird issue if I just use MessageTransformBean directly to .txt file the conversion filetoxml is done ok.

I think have to be a issue with the module PayloadZipBean but I cant get it.....

Thanks!!!!

stefan_grube
Active Contributor
0 Kudos

When you use only the zip bean, does it work for you? is the file displayed correctly in SXMB_MONI?

former_member200962
Active Contributor
0 Kudos

You have to make use of the PayloadZip bean to unzip the file.....