How to zip (archive/compress in .zip) a file inside SOA using BPEL? - soap

I have a requirement to pick a .dat file from a remote server and move to a content server using soap but as a zip file. What is the best way to achieve the same? I am using SOA 12c. Is java embedding a way to do so? What are the other ways?

Related

Count files in a ZIP file over SFTP using PowerShell

I am connecting to SFTP via host, port, username and password using PowerShell. I want to count the number of files in a particular zip folder without having to download the zip folder on my local machine and count. Please share the piece of logic that would do this. I looked into this but it seems a bit tricky when it comes to do this in a zip folder.
That's not an easy task to do. There's no API in SFTP to do that completely remotely. There are basically two solutions:
Use SFTP to download only the ZIP central directory (basically the listing that is placed at the very end of the ZIP file). And decode the directory locally. For C#, this is covered in my answer to List files inside ZIP file located on SFTP server in C#. Though as mentioned there, there's a bug in SSH.NET that requires a workaround with implementing an interface. While that's probably doable in PowerShell too, I've never done that.
If you have an SSH shell access to the server, use remote zip command to list the contents of the file. Or build another API (like a web service).
Btw, note that there's nothing like ZIP "folder". ZIP is an archive file. It's only Windows that call ZIP files "folders".

Export OSB resources without using export wizard on JDeveloper

Using JDeveloper in order to create and manage Oracle Service Bus 12c resources, I am able to export the required resources into a .jar file using the Resources Export Wizard of JDeveloper, selecting one by one those needed, under the tree of each project.
What I want to do though is find a way to export a .jar file based on resources list, given in a file of a commonly used format (JSON, CSV etc), as it can be time saving for a large number of resources. My first thought was to search if JDeveloper provides such way or attempt do this programmatically, yet my search on this has not given me any information of how-to.
Is there an alternative way of doing this?
If you have Oracle OSB 11.1.1.7.0 or higher you can automate the compilation process for OSB at project level using configjar, here's a whole example of an implementation which include: compilation using configjar, automating the task retrieving the code from GIT using Jenkins and a python script.
You can also do it using ANT, here's a good document of Oracle explaining that. (I've tried it, but found easier to use configjar, this is the only option for versions below 11.1.1.7.0).
After creating any of those compilation methods you can create a CSV file, parse it with python and loop the compilation.

How to read and write text files from appengine?

I am using eclipse Luna. I want to read and write text files from my appengine and the path of those files I will set on run time from the local host, like "C:\Users\Public\Documents\newfile.txt" . Anyone give me a good code or link or a direction how to resolve this.
You cannot write to file system in AppEngine but you can use CloudStorage https://cloud.google.com/appengine/docs/standard/java/googlecloudstorageclient/read-write-to-cloud-storage. Duplicate of Does Google App Engine allow creation of files and folders on the server?

Building .car ColdFusion Archive from command-line

The current way I'm packaging my application is to deploy it on a running ColdFusion server, and export is as a .car (Coldfusion ARchive) through the admin console, but this manual process is usually prone to errors.
That's why I'm looking for a tool (or any solution) to build this final .car from the command line (so without requiring a ColdFusion server up and running).
Note: because of the complexity and the size of this legacy application, I cannot work with .war files, and I'm not aware of any other packaging format than .war or .car for ColdFusion applications.
Hi unfortunately Coldfusion is not built to use in this way but you can use API or the admin console.
I invite you to read this page : http://help.adobe.com/en_US/ColdFusion/10.0/Admin/WSc3ff6d0ea77859461172e0811cbf3638e6-7fc5.html for more details.
From coldfusion 9 servers, CAR files are zip files. You can unzip them, edit the files, and zip them back up and deploy them on coldfusion10 servers. The zip contains a folder called "{WorkingDir}" with curly brackets.
Structure looks like
{WorkingDir}
server_settings.xml
archive_settings.xml

Generating Web.Config Transform File from existing spearate Web Config

Is there a method/process that can take a web config file, i.e. WebConfigDev, and a second web config file, i.e. WebConfigQA, and generate a web config transform file for WebConfigDev to WebConfigQA?
I'm looking to have the files generated automatically because I currently have separate config files for each environment that I manually rename when deploying to a new environment. Each config file is fairly extensive and would require a fair amount of time to rework by hand and I'm hoping there is a more efficient way to do this.
Unfortunately there is not an existing utility within Visual Studio 2010 to do this.