private WSDDDocument createWsddUndeployDocument(final Port port) throws WSDDException { final StringWriter wsddWriter = new StringWriter(); wsddWriter.write("<?xml version='1.0' encoding='UTF-8'?>\n"); wsddWriter.write("<undeployment xmlns='http://xml.apache.org/axis/wsdd/'>\n"); wsddWriter.write("<service name='" + this.getServiceName(port) + "'/>\n"); wsddWriter.write("</undeployment>"); return new WSDDDocument(XmlUtil.getDocumentFromString(wsddWriter.toString())); } }
private void processWSDD(File dir) throws ConfigurationException { File file = new File(dir, this.configFile); if (!file.exists()) { return; } log.debug("Loading service configuration from file: " + file); InputStream in = null; try { in = new FileInputStream(file); WSDDDocument doc = new WSDDDocument(XMLUtils.newDocument(in)); doc.deploy(this.deployment); } catch (Exception e) { throw new ConfigurationException(e); } finally { if (in != null) { try { in.close(); } catch (IOException e) {} } } }
private void processWSDD(File dir) throws ConfigurationException { File file = new File(dir, this.configFile); if (!file.exists()) { return; } log.debug("Loading service configuration from file: " + file); InputStream in = null; try { in = new FileInputStream(file); WSDDDocument doc = new WSDDDocument(XMLUtils.newDocument(in)); doc.deploy(this.deployment); } catch (Exception e) { throw new ConfigurationException(e); } finally { if (in != null) { try { in.close(); } catch (IOException e) {} } } }
private void processWSDD(File dir) throws ConfigurationException { File file = new File(dir, this.configFile); if (!file.exists()) { return; } log.debug("Loading service configuration from file: " + file); InputStream in = null; try { in = new FileInputStream(file); WSDDDocument doc = new WSDDDocument(XMLUtils.newDocument(in)); doc.deploy(this.deployment); } catch (Exception e) { throw new ConfigurationException(e); } finally { if (in != null) { try { in.close(); } catch (IOException e) {} } } }
/** * register an open stream, which we close afterwards * @param instream * @throws SAXException * @throws ParserConfigurationException * @throws IOException */ public void registerStream(InputStream instream) throws SAXException, ParserConfigurationException, IOException { try { Document doc=XMLUtils.newDocument(instream); WSDDDocument wsddDoc = new WSDDDocument(doc); WSDDDeployment deployment; deployment = getDeployment(); if(deployment!=null) { wsddDoc.deploy(deployment); } } finally { instream.close(); } }
/** * register an open stream, which we close afterwards * @param instream * @throws SAXException * @throws ParserConfigurationException * @throws IOException */ public void registerStream(InputStream instream) throws SAXException, ParserConfigurationException, IOException { try { Document doc=XMLUtils.newDocument(instream); WSDDDocument wsddDoc = new WSDDDocument(doc); WSDDDeployment deployment; deployment = getDeployment(); if(deployment!=null) { wsddDoc.deploy(deployment); } } finally { instream.close(); } }
/** * register an open stream, which we close afterwards * @param instream * @throws SAXException * @throws ParserConfigurationException * @throws IOException */ public void registerStream(InputStream instream) throws SAXException, ParserConfigurationException, IOException { try { Document doc=XMLUtils.newDocument(instream); WSDDDocument wsddDoc = new WSDDDocument(doc); WSDDDeployment deployment; deployment = getDeployment(); if(deployment!=null) { wsddDoc.deploy(deployment); } } finally { instream.close(); } }
WSDDDocument wsddDoc = new WSDDDocument(root); EngineConfiguration config = engine.getConfig(); if (config instanceof WSDDEngineConfiguration) {
WSDDDocument wsddDoc = new WSDDDocument(root); EngineConfiguration config = engine.getConfig(); if (config instanceof WSDDEngineConfiguration) {
wsddWriter.write("</deployment>"); return new WSDDDocument(XmlUtil.getDocumentFromString(wsddWriter.toString()));
WSDDDocument wsddDoc = new WSDDDocument(root); EngineConfiguration config = engine.getConfig(); if (config instanceof WSDDEngineConfiguration) {
public void configureEngine(AxisEngine engine) throws ConfigurationException { try { if (getInputStream() == null) { try { setInputStream(new FileInputStream(configFile)); } catch (Exception e) { if (searchClasspath) setInputStream(ClassUtils.getResourceAsStream(engine.getClass(), filename, true)); } } if (getInputStream() == null) { throw new ConfigurationException( Messages.getMessage("noConfigFile")); } WSDDDocument doc = new WSDDDocument(XMLUtils. newDocument(getInputStream())); deployment = doc.getDeployment(); deployment.configureEngine(engine); engine.refreshGlobalOptions(); setInputStream(null); } catch (Exception e) { throw new ConfigurationException(e); } }
public void configureEngine(AxisEngine engine) throws ConfigurationException { try { if (getInputStream() == null) { try { setInputStream(new FileInputStream(configFile)); } catch (Exception e) { if (searchClasspath) setInputStream(ClassUtils.getResourceAsStream(engine.getClass(), filename, true)); } } if (getInputStream() == null) { throw new ConfigurationException( Messages.getMessage("noConfigFile")); } WSDDDocument doc = new WSDDDocument(XMLUtils. newDocument(getInputStream())); deployment = doc.getDeployment(); deployment.configureEngine(engine); engine.refreshGlobalOptions(); setInputStream(null); } catch (Exception e) { throw new ConfigurationException(e); } }
public void configureEngine(AxisEngine engine) throws ConfigurationException { try { if (getInputStream() == null) { try { setInputStream(new FileInputStream(configFile)); } catch (Exception e) { if (searchClasspath) setInputStream(ClassUtils.getResourceAsStream(engine.getClass(), filename, true)); } } if (getInputStream() == null) { throw new ConfigurationException( Messages.getMessage("noConfigFile")); } WSDDDocument doc = new WSDDDocument(XMLUtils. newDocument(getInputStream())); deployment = doc.getDeployment(); deployment.configureEngine(engine); engine.refreshGlobalOptions(); setInputStream(null); } catch (Exception e) { throw new ConfigurationException(e); } }