Hi,
I just placed a feature request about this on Brainstorm: “04146 - Audit settings should be managed as configuration settings”.
Without this change, it is still possible to change audit setting in a runtime environment with a service, but you should create you own Java utilities.
The way I have done it, is to use the Java API com.wm.lang.ns.NSService and com.wm.lang.ns.AuditSettings (see documentation):
...
import com.wm.data.*;
import com.wm.util.Values;
import com.wm.app.b2b.server.Service;
import com.wm.app.b2b.server.ServiceException;
import java.util.HashMap;
import java.util.Map;
import com.wm.lang.ns.AuditSettings;
import com.wm.lang.ns.NSName;
import com.wm.lang.ns.NSService;
import com.wm.app.b2b.server.ns.Namespace;
...
NSService serviceNS = getServiceNS("yourServiceName");
AuditSettings settings = getAuditSettings(serviceNS);
...
serviceNS.setAuditSettings(settings);
...
/**
Helper maps
*/
private static final MapDictionary MAP_AUDIT_OPTIONS = new MapDictionary();
static {
MAP_AUDIT_OPTIONS.put(NSService.AUDIT_DISABLED,
"Never");
MAP_AUDIT_OPTIONS.put(NSService.AUDIT_ENABLE,
"Always");
MAP_AUDIT_OPTIONS.put(NSService.AUDIT_ENABLE_TOPLEVEL,
"Top-Level Service Only");
}
/**
*
*/
private static final MapDictionary MAP_AUDIT_SAVE_OPTIONS = new MapDictionary();
static {
MAP_AUDIT_SAVE_OPTIONS.put(AuditSettings.LOG_NONE,
"Never");
MAP_AUDIT_SAVE_OPTIONS.put(AuditSettings.LOG_WITHOUTPIPELINE,
"On Error");
MAP_AUDIT_SAVE_OPTIONS.put(AuditSettings.LOG_WITHPIPELINE,
"Always");
}
...
Good luck,
#webMethods#Integration-Server-and-ESB