OMElement zip = (zipPart == null) ? null : zipPart.getFirstElement();
if (zip == null || !zipPart.getQName().getLocalPart().equals("package")
|| !zip.getQName().getLocalPart().equals("zip"))
throw new OdeFault("Your message should contain an element named 'package' with a 'zip' element");
OMText binaryNode = (OMText) zip.getFirstOMChild();
if (binaryNode == null) {
throw new OdeFault("Empty binary node under <zip> element");
}
binaryNode.setOptimize(true);
try {
// We're going to create a directory under the deployment root and put
// files in there. The poller shouldn't pick them up so we're asking
// it to hold on for a while.
_poller.hold();
File dest = new File(_deployPath, namePart.getText() + "-" + _store.getCurrentVersion());
dest.mkdir();
unzip(dest, (DataHandler) binaryNode.getDataHandler());
// Check that we have a deploy.xml
File deployXml = new File(dest, "deploy.xml");
if (!deployXml.exists())
throw new OdeFault("The deployment doesn't appear to contain a deployment " +