//switch between the correct writer
if (CommandLineOptionConstants.WSDL2JavaConstants.WSDL_VERSION_2.
equals(codeGenConfiguration.getWSDLVersion())) {
// Woden cannot serialize the WSDL as yet, so lets serialize the axisService for now.
WSDL20Writer wsdl20Writer = new WSDL20Writer(
codeGenConfiguration.isFlattenFiles() ?
getOutputDirectory(codeGenConfiguration.getOutputLocation(), null) :
getOutputDirectory(codeGenConfiguration.getOutputLocation(),
codeGenConfiguration.getResourceLocation()));
wsdl20Writer.writeWSDL(axisService);
} else {
// here we are going to write the wsdl and its imports
// with out using the axis service.