WSDLWriter wsdlWriter = new WSDLWriterImpl();
try {
if (outputToConsole)
wsdlWriter.writeWSDL(wsdlDef, System.out);
FileWriter myOutput = new FileWriter(wsdFileName);
wsdlWriter.writeWSDL(wsdlDef, myOutput);
myOutput.close();
} catch (WSDLException wsdlEx){
System.err.println("WSDL Exception: " + wsdlEx.getMessage());
} catch (IOException ioex){
System.err.println("IO Exception: " + ioex.getMessage());