cancel
Showing results for 
Search instead for 
Did you mean: 

Webservice with zip attached file

inigo_sacramento
Participant
0 Kudos

Hi everyone.

I have to receive a webservice with a zip archive as an attachment.

I think that i can do this in two steps. First of all, i have to get that file and put it in a folder. Problem is that is not a plain text or a xml so i don't know how to save it.

First i use the PayloadSwapBean so i set the attachment as the payload. But now ... how can i save this ZIP file?

Regards,

Inigo.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi

Your first step is right as use the PayloadSwapBean to swap the Attachement and the SOAP payload and use this in your mapping

Now you have to use the PayloadZipBean module here.

More on that ..

http://help.sap.com/saphelp_nw70/helpdata/en/45/da9358a1772e97e10000000a155369/frameset.htm

Also Refer for step by step process for Zip files

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

Just as a Note : youhave to use these modules in SOAP receiver, you can't use it SOAP sender.

Thanks

Swarup

inigo_sacramento
Participant
0 Kudos

Hi again.

I have one doubt. Is i set zip.mode to 'unzip', this will unzip the attachment.

Now i have another doubt. This attachment has inside a file called 'test.dat' wich is a plain text file.

I want to get that file and write it in a folder using content conversion.

how can i do this?

regards,

Inigo.

Former Member
0 Kudos

Hi,

If you will be looking unzip the attachment then you need to use zip mode as Unzip

But if you will be looking for zip fiel as an attachment then you need zip.mode as zip or zipOne.

Please don't mind but Your last concern have confused me. Are you looking for the File adapter or SOAP.

If you have attachment with file adapter on sender side then you have to use the same module with zip.mode as Unzip and define all other parameters as it is.

Thanks

Swarup

inigo_sacramento
Participant
0 Kudos

Hi Swarup.

This is my scenario.

I have a sender soap adapter. Through this adapter, XI receives a message with a ZIP file attached.

First step i've done is in SOAP sender adapter, use PayloadSwapBean to change the payload and set as main payload, the attachment.

Second step must be open the txt file that is inside the attached ZIP file. In order to test if it is working, i decided to create a receiver file adapter so i can write the ZIP file into a folder but my real scenario is to open that file, get the N records and send them via RFC to an R3 backend.

Regards,

Inigo.

stefan_grube
Active Contributor
0 Kudos

You cannot add adapter modules in sender SOAP adapter.

But you can yous the SOAP Axis adapter. Here you can use following modules:

PayloadZipBean - to unzip

MessagTransformBean - to create XML from text file.

See here:

http://help.sap.com/saphelp_nw04/helpdata/en/45/a4a36de28552f7e10000000a1553f7/frameset.htm

Hope that helps

Stefan

Answers (0)