if (action.equals("clientdeploy")) {
// set engine to client engine
engine = engine.getClientEngine();
}
WSDDDocument wsddDoc = new WSDDDocument(root);
EngineConfiguration config = engine.getConfig();
if (config instanceof WSDDEngineConfiguration) {
WSDDDeployment deployment =
((WSDDEngineConfiguration)config).getDeployment();
wsddDoc.deploy(deployment);
}
engine.refreshGlobalOptions();
engine.saveConfiguration();