8/10/2019 (is) Zipping Files-Payloads Using Module PayloadZipBean
1/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 functionthat 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 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 andsuccessively 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
8/10/2019 (is) Zipping Files-Payloads Using Module PayloadZipBean
2/13
Defining Message Types:
Defining Message Interfaces:
8/10/2019 (is) Zipping Files-Payloads Using Module PayloadZipBean
3/13
Message Mapping:
Interface Mapping:
8/10/2019 (is) Zipping Files-Payloads Using Module PayloadZipBean
4/13
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_FileReceiveto BS_FILE_Receive
8/10/2019 (is) Zipping Files-Payloads Using Module PayloadZipBean
5/13
Assign MI_FileSenderto BS_FILE_SEND
Create Communication Channels:
We create communication channels as same as normal scenarios, apart from what we create we add thismodule PayloadZippedBean in module tab of Receiver Communication Channel properties.
Sender Communication Channel: CC_MFileSender
8/10/2019 (is) Zipping Files-Payloads Using Module PayloadZipBean
6/13
We provide multiple files in Advanced Selection for Source File; we check the checkbox and add files thatare to be picked up.
Receiver Communication Channel: CC_ZipFileReceiver
8/10/2019 (is) Zipping Files-Payloads Using Module PayloadZipBean
7/13
We provide the File name Schemeas .zipfile, specifying the same doesnt generate a zip file; it mustassociate a module to generate the zip file.
Click here to continue...
http://www.saptechnical.com/Tutorials/XI/ZippingFiles/demo2.htmhttp://www.saptechnical.com/Tutorials/XI/ZippingFiles/demo2.htmhttp://www.saptechnical.com/Tutorials/XI/ZippingFiles/demo2.htm8/10/2019 (is) Zipping Files-Payloads Using Module PayloadZipBean
8/13
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 -- To compress the main payload zipAll -- To compress all payloads
unzip -- 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:
http://www.saptechnical.com/Tutorials/XI/ZippingFiles/demo.htmhttp://www.saptechnical.com/Tutorials/XI/ZippingFiles/demo.htmhttp://www.saptechnical.com/Tutorials/XI/ZippingFiles/demo.htm8/10/2019 (is) Zipping Files-Payloads Using Module PayloadZipBean
9/13
Sender Agreement:
Interface Determination:
8/10/2019 (is) Zipping Files-Payloads Using Module PayloadZipBean
10/13
Receiver Determination:
Source Files:
8/10/2019 (is) Zipping Files-Payloads Using Module PayloadZipBean
11/13
SXMB_MONI:
Output zipped files:
8/10/2019 (is) Zipping Files-Payloads Using Module PayloadZipBean
12/13
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 andpress Use Filter.
Select the successfully processed message of yours it will popup Message Display tool.
Select Audit Log:
8/10/2019 (is) Zipping Files-Payloads Using Module PayloadZipBean
13/13