String serviceName = ruleServiceDescription.getName();
OMElement result =
ServiceDescriptionSerializer.serializeToRuleServiceConfiguration(
ruleServiceDescription,
OMNamespaceFactory.getInstance().createOMNamespace(new QName(serviceName)),
new AXIOMXPathSerializer(), CONFIGURATION_EXTENSION_SERIALIZER);
result.addAttribute(
OM_FACTORY.createOMAttribute(RuleConstants.ATT_GENERATE_SERVICES_XML.getLocalPart(),
NULL_NS, String.valueOf(ruleServiceDescription.isContainsServicesXML())));
if (ruleServiceDescription.isContainsServicesXML()) {
ruleServiceDescription.setExtension(RuleConstants.RULE_SERVICE_ARCHIVE_EXTENSION);