Examples of deparseDocument()


Examples of org.jboss.staxmapper.XMLMapper.deparseDocument()

        final XMLMapper mapper = XMLMapper.Factory.create();
        final ByteArrayOutputStream baos = new ByteArrayOutputStream();
        final BufferedOutputStream bos = new BufferedOutputStream(baos);
        final XMLStreamWriter writer = XMLOutputFactory.newInstance().createXMLStreamWriter(bos);
        try {
            mapper.deparseDocument(new RootElementWriter(element, content), writer);
        }
        catch (XMLStreamException e) {
            // Dump some diagnostics
            stdout.println("XML Content that was written prior to exception:");
            stdout.println(writer.toString());
View Full Code Here

Examples of org.jboss.staxmapper.XMLMapper.deparseDocument()

                        synchronized (subsystemDeploymentWriters) {
                            return subsystemDeploymentWriters.get(extensionName);
                        }
                    }
                };
                mapper.deparseDocument(rootDeparser, extensibleModel, streamWriter);
                streamWriter.close();
            } finally {
                safeClose(streamWriter);
            }
        } catch (Exception e) {
View Full Code Here

Examples of org.jboss.staxmapper.XMLMapper.deparseDocument()

        final ModelNode config = ret.get("mod-cluster-config");
        XMLExtendedStreamWriter streamWriter = new FormattingXMLStreamWriter( XMLOutputFactory.newInstance().createXMLStreamWriter((new FileOutputStream(file))));
        SubsystemMarshallingContext context = new SubsystemMarshallingContext(config, streamWriter);

        mapper.deparseDocument(new ModClusterSubsystemXMLWriter(), context, streamWriter);
        streamWriter.close();
        return ret;
    }
}
View Full Code Here

Examples of org.jboss.staxmapper.XMLMapper.deparseDocument()

                        synchronized (subsystemDeploymentWriters) {
                            return subsystemDeploymentWriters.get(extensionName);
                        }
                    }
                };
                mapper.deparseDocument(rootDeparser, extensibleModel, streamWriter);
                streamWriter.close();
            } finally {
                safeClose(streamWriter);
            }
        } catch (Exception e) {
View Full Code Here

Examples of org.jboss.staxmapper.XMLMapper.deparseDocument()

                configFile.createNewFile();
                fos = new FileOutputStream(configFile);
                bos = new BufferedOutputStream(fos);
                writer = XMLOutputFactory.newInstance().createXMLStreamWriter(bos);
                final XMLMapper mapper = XMLMapper.Factory.create();
                mapper.deparseDocument(new RootElementWriter(), writer);
            }
            catch (Exception e) {
                logger.errorf(e, "Failed persisting configuration file %s" , configFile.getAbsolutePath());
            }
            finally {
View Full Code Here

Examples of org.jboss.staxmapper.XMLMapper.deparseDocument()

            FileOutputStream out = new FileOutputStream(file);

            try {
                XMLStreamWriter writer = XMLOutputFactory.newInstance().createXMLStreamWriter(out);
                XMLMapper mapper = createMapper(timer.getTimerService());
                mapper.deparseDocument(new EjbTimerXmlPersister(factory, configuration), Collections.singletonList(timer), writer);
                writer.flush();
                writer.close();
            } finally {
                safeClose(out);
            }
View Full Code Here

Examples of org.jboss.staxmapper.XMLMapper.deparseDocument()

                        synchronized (subsystemDeploymentWriters) {
                            return subsystemDeploymentWriters.get(extensionName);
                        }
                    }
                };
                mapper.deparseDocument(rootDeparser, extensibleModel, streamWriter);
                streamWriter.close();
            } finally {
                safeClose(streamWriter);
            }
        } catch (Exception e) {
View Full Code Here

Examples of org.jboss.staxmapper.XMLMapper.deparseDocument()

            configFile.createNewFile();
            fos = new FileOutputStream(configFile);
            bos = new BufferedOutputStream(fos);
            writer = XMLOutputFactory.newInstance().createXMLStreamWriter(bos);
            final XMLMapper mapper = XMLMapper.Factory.create();
            mapper.deparseDocument(new RootElementWriter(hostModel), writer);
        }
        catch (Exception e) {
            logger.errorf(e, "Failed persisting configuration file %s" , configFile.getAbsolutePath());
        }
        finally {
View Full Code Here

Examples of org.jboss.staxmapper.XMLMapper.deparseDocument()

                        synchronized (subsystemDeploymentWriters) {
                            return subsystemDeploymentWriters.get(extensionName);
                        }
                    }
                };
                mapper.deparseDocument(rootDeparser, extensibleModel, streamWriter);
                streamWriter.close();
            } finally {
                safeClose(streamWriter);
            }
        } catch (Exception e) {
View Full Code Here

Examples of org.jboss.staxmapper.XMLMapper.deparseDocument()

            configFile.createNewFile();
            fos = new FileOutputStream(configFile);
            bos = new BufferedOutputStream(fos);
            xmlWriter = XMLOutputFactory.newInstance().createXMLStreamWriter(bos);
            final XMLMapper mapper = XMLMapper.Factory.create();
            mapper.deparseDocument(new RootElementWriter(domainModel), xmlWriter);
        } catch (Exception e) {
            logger.errorf(e, "Failed persisting configuration file %s" , configFile.getAbsolutePath());
        } finally {
            if (xmlWriter != null) {
                try {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.