public void generateWSDL(final String serviceName, final OutputStream out) { try { final WSDLWriter wsdl = getWSDL(serviceName); wsdl.write(out); } catch (IOException e) { throw new XFireRuntimeException("Couldn't generate WSDL.", e); } }
@Override protected void processService(Service service) { String serviceName = service.getName().getLocalPart(); File outputFile = new File(outputDir, serviceName + ".wsdl"); FileOutputStream out; try { out = new FileOutputStream(outputFile); } catch (FileNotFoundException e) { throw new BuildException("Unable to generate WSDL: output file " + outputFile + " not found", e); } OutputStream stream; stream = new BufferedOutputStream(out); try { service.getWSDLWriter().write(stream); } catch (IOException e) { throw new BuildException("Unable to generate WSDL.", e); } generatedFile = outputFile; }