Hello Everyone,
I hope everything is all right and well. When I stepped into the PI/PO industry, our team consisted of only two people: Me and my senior. Since my senior is usually very busy, I had to do much work on my own. Unfortunately, sometimes there was no one on our team who had done some of the work we received before. With the excitement of being a junior, I managed to do these jobs on my own, which no one in our team had done before, with a lot of research, sweat, and tears. In this way, I made both myself and my senior proud. My days as a junior are a few years behind me. Now, I think I have enough knowledge to share these pieces of information. While sharing these pieces of information with you, I will try to explain it to you as easily and understandably as I can.
The first of these is how to read and transmit zip-compressed files over SFTP. As you know, we cannot send zip files directly via SFTP. Of course, there are some methods for this. The first thing that comes to mind is writing a UDF for this process. However, there was a saying we often heard from our professors during my engineering education: An engineer is someone who can produce practical solutions to problems. As a result of my research based on this, I learned that this job can be done in a simpler way, without using code. Thanks to PayloadZipBean, I learned that this can be done easily. I share with you the link containing the details:
Based on the information here, we can send zip-compressed files via SFTP. Let's say, we have a zip file named Warhammer40k.zip, and we need to unzip the compressed file in this file and send them to the other party. One of the best aspects of this process, apart from doing it without code, is that we can do this without creating any ESR objects.
So, to perform the process, first of all, in the SFTP sender channel, the Set Adapter Specific Message Attributes and File Name boxes under the Advanced tab must be checked :
Afterwards, the following changes should be made in the Module tab:
Below you will find the information that needs to be written :
1 AF_Modules/PayloadZipBean Local Enterprise Bean zip
2 localejbs/CallSapAdapter Local Enterprise Bean entry
zip zip.mode unzip
After the operations in the Sender channel are completed, it will be sufficient to perform the following operations in the SFTP Receiver channel:
The Use Adapter Specific Message Attributes box under the Advanced tab should be selected:
If you remember, we were going to do these operations without creating any ESR object. So, in this case, how do we enter the information on the Integrated Configuration side? The important parts here are the Interface and Namespace names. Even if you have not created the objects, you can give names to these objects on the Integrated Configuration side :
When we want to send our Warhammer40k.zip file after the settings in the Integrated Configuration are made, the service will unzip the file and forward the file inside to the other party :
Small notes:
In my next article, I will explain what methods we should follow in case there are multiple files with different names in the zip file.
Thank you, have a great day!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
15 | |
5 | |
3 | |
2 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |