You are on page 1of 13

Zipping Files/Payloads using Module PayloadZipBean

By Praveen Kumar Kurni, YASH Technologies


Before proceeding with the actual scenario, we would discuss about the importance of module and the bean
PayloadZipBean.
What is a module? Where do we use it? How to use it?

A module is a self-contained component of a system, in SAP XI terms it acts as a special function


that is used by an Adapter to give provide the additional functionality to the Adapter.
We can use module in module tab of the Communication Channel Configuration
Provide Module Name, Module Type, Module Key as follows:
Module Name: localejbs/AF_Modules/<Module Name>

Module Type: Local/Remote Enterprise Bean or Java bean


Module Key: Any key name to handle Module Parameters ex: M1

Purpose of the Bean: PayloadZipBean


We use this module to compress one or more payloads or extract payloads from a compressed file.
Prerequisites to use this Bean:
We have configured a communication channel and are on the Module tab page in change mode
Business case:
If we have a multiple files with large size to be processed, this module can reduce the size of the file and
successively reduce the load on the XI/PI server.
System Landscape Directory (SLD)
We consider all the configurations are done in SLD for normal File-to-File scenario.
Integration Repository (IR)

Import software Component from SLD: Use Menu->Tools Option

Create Name Space

Define Data Types

Source Data Type ---- DT_FileSender

Target Data Type ---- DT_FileReceive

Defining Message Types:

Defining Message Interfaces:

Message Mapping:

Interface Mapping:

Integration Directory:
We create configuration scenario as follows:

We assign Business Systems/Business Services based on the requirement.


Plz check Business Services are been used in this scenario.

Assigning Message Interfaces to the Business Services:


We assign Message Interfaces to the Business Services manually.
Assign MI_FileReceive to BS_FILE_Receive

Assign MI_FileSender to BS_FILE_SEND

Create Communication Channels:


We create communication channels as same as normal scenarios, apart from what we create we add this
module PayloadZippedBean in module tab of Receiver Communication Channel properties.
Sender Communication Channel: CC_MFileSender

We provide multiple files in Advanced Selection for Source File; we check the checkbox and add files that
are to be picked up.
Receiver Communication Channel: CC_ZipFileReceiver

We provide the File name Scheme as .zip file, specifying the same doesnt generate a zip file; it must
associate a module to generate the zip file.
Click here to continue...

Zipping Files/Payloads using Module PayloadZipBean


...Previous
Module Tab of Receiver Communication Channel:

Identify that we have added the following in this module tab


Module Name: loacalejbs/AF_Modules/PayloadZipbean
Module Type:

Local Enterprise Bean (its a selection among three options)

Module Key: Zip (key to handle module and its parameters)


And also do identify that, we have added a row in module Configuration that is to specifying modeof zip, i.e.,
that is how to zip payloads for which we have 3 options here
Parameter value

zip/ zip one


zipAll
unzip

-- To compress the main payload


-- To compress all payloads
-- To decompress the main payload

Similarly we can specify the output zip file to be named as payload name:
Zip.fileNameKey

-- payloadName / contentType

Then we specify the following:


Receiver Determination:

Sender Agreement:

Interface Determination:

Receiver Determination:

Source Files:

SXMB_MONI:

Output zipped files:

File with 286 Bytes is reduced to 263 Bytes. Compare the same with large files.

To see how this module gets processed in Adapter Engine:


Go to Communication Channel Monitoring of Runtime Workbench and provide the necessary details and
press Use Filter.

Select the successfully processed message of yours it will popup Message Display tool.
Select Audit Log:

You might also like