DataPower provides good functionality in dealing with zip archives:
- you may extract files from an archive
- you may add files to an archive
- you may create a new archive
Since zip archives are "binary" data they cannot be handled in XML directly.
DataPower allows zip archive processing as attachment in a "Soap With Attachment" (SWA) document
(in fact DataPower also knows the non-standard concept of "XML with attachment").
The details on what DataPower allows you to do with zip archives can be found in chapter "Attachment Protocol":
So everything is fine if you send a SWA file.
But even processing of the zip achive itself is possible!
I provided tool "makeSwa" in this posting (makeSwa.zip export is attached):
The service accepts Non-XML traffic, attaches the binary input to a dummy SOAP document and therefore creates the SWA file needed for further processing.
The binary input of Non-XML transformations needs to be "consumed", otherwise the default behavior is that it will be copied to the output.
Attaching the input to the dummy SOAP file does not consume the input.
Therefore stylesheet "bin.xsl" needs to invoke a <dp:input-mapping>, whose output is just discarded.
In the posting above a separate FFD file is provided and used.
Because its output is not used at all bin.xsl's line
<dp:input-mapping href="bin.ffd" type="ffd"/>can be simplified to refer to a FFD file that is offically shipped as part of the DataPower product:
<dp:input-mapping href="store:///pkcs7-convert-input.ffd" type="ffd"/>This way no dummy FFD file needs to be provided.