HELP zip and transfer a doc to another broker

Hi All,
Now I have a requirment that transfer very big XML file from an enterprise server to another which should go through WAN, so in order to get better performance, I want to zip the file and then transfer it to the other broker, well, how can I do it , should I write script operation on both side to zip–>ftp–>unzip the document?

Thank you & B.R.

If you are sending from Broker to Broker, you will not need to FTP the data. You will be able to publish it directly to your target application’s adapter. In fact, that wil be faster than FTP because it uses the webMethods Broker’s fast internal socket-based protocol.

Zipping the data is a good way to move it to the subscriber. You can try to create a document to publish that contains a byte array field. Then, you can map the zipped file contents to the byte array and publish it to the Broker.

The subscribing adapter will need to unzip the byte array as a step of the subscribing component.

Hi,
Then the step will be: create the original document–>save the document as a file–>zip the file–>generate a new document contains a byte array that maps to the zipped file–>publish the new document–>(to the other broker)–>write the byte array to a file–>unzip the file–>read the unzipped file as the original document.
So customer code(script operation) should be written to perform the zip and unzip task.
Is my understanding right? it seems a little complex.

Thanks

You don’t have to go the extra step of create zip files on disk, if you are willing to write a little bit of Java. In Java you can create a I/O stream from the document byte array. Such an i/o stream can be passed to a zip method that produces another i/o stream, now compressed, that you can use to write to a byte array. This new byte array contains the compressed data. Put it into the document that you are publishing to your other system and reverse the process there.

Rgs,
Andreas