protected void writeServiceXml() throws Exception {
// Write the service xml in a folder with the
Document serviceXMLModel = createDOMDocumentForServiceXML();
debugLogDocument("Document for service XML:", serviceXMLModel);
FileWriter serviceXmlWriter =
new ServiceXMLWriter(
codeGenConfiguration.isFlattenFiles() ?
getOutputDirectory(codeGenConfiguration.getOutputLocation(), null) :
getOutputDirectory(codeGenConfiguration.getOutputLocation(),
codeGenConfiguration.getResourceLocation()),
this.codeGenConfiguration.getOutputLanguage());
serviceXmlWriter.setOverride(codeGenConfiguration.isOverride());
writeFile(serviceXMLModel, serviceXmlWriter);
codeGenConfiguration.addXmlFileName(serviceXmlWriter.getOutputFile().getAbsolutePath());//$NON-SEC-3
}