public boolean deployModule(OMElement element) throws AxisFault { try { if (element == null) { throw new AxisFault("Element null"); } String fileName = element.getLocalName(); OMNode node = element.getFirstOMChild(); if (node instanceof OMText) { OMText txt = (OMText) node; String repo = getAxisConfig().getRepository().getPath(); DataHandler expectedDH = (DataHandler) txt.getDataHandler(); File moduleDir = new File(repo, "modules"); File file = new File(moduleDir, fileName); OutputStream out = new FileOutputStream(file); expectedDH.writeTo(out); out.flush(); out.close(); AxisModule module = DeploymentEngine.buildModule(file, getAxisConfig()); getAxisConfig().addModule(module); return true; } else { throw new AxisFault("Invalid Message"); } } catch (IOException e) { throw AxisFault.makeFault(e); } }