public static void writeTo(Node node, Writer os) throws XMLStreamException { writeTo(node, os, 0); } public static void writeTo(Node node, Writer os, int indent) throws XMLStreamException {
public static void writeTo(Node node, Writer os) throws XMLStreamException { writeTo(node, os, 0); } public static void writeTo(Node node, Writer os, int indent) throws XMLStreamException {
public static void writeTo(Node node, Writer os) throws XMLStreamException { writeTo(node, os, 0); } public static void writeTo(Node node, Writer os, int indent) throws XMLStreamException {
public static void writeTo(Node node, Writer os) throws XMLStreamException { writeTo(node, os, 0); } public static void writeTo(Node node, Writer os, int indent) throws XMLStreamException {
public static void writeTo(Node node, Writer os) throws XMLStreamException { writeTo(node, os, 0); } public static void writeTo(Node node, Writer os, int indent) throws XMLStreamException {
public void writeWSDL(Definition wsdlDef, Writer sink) throws WSDLException { try { StaxUtils.writeTo(getDocument(wsdlDef), sink, 2); } catch (XMLStreamException e) { throw new RuntimeException(e); } } public void writeWSDL(Definition wsdlDef, OutputStream sink) throws WSDLException {
private void generateHandlerChainFile(Element hChains, Writer writer) throws ToolException { try { StaxUtils.writeTo(hChains, writer, 2); writer.close(); } catch (Exception ex) { throw new ToolException(ex); } } }
public void writeWSDL(Definition wsdlDef, OutputStream sink) throws WSDLException { try { StaxUtils.writeTo(getDocument(wsdlDef), sink, 2); } catch (XMLStreamException e) { throw new RuntimeException(e); } }
public void writeWSDL(Definition wsdlDef, Writer sink) throws WSDLException { try { StaxUtils.writeTo(getDocument(wsdlDef), sink, 2); } catch (XMLStreamException e) { throw new RuntimeException(e); } } public void writeWSDL(Definition wsdlDef, OutputStream sink) throws WSDLException {
public void writeWSDL(Definition wsdlDef, OutputStream sink) throws WSDLException { try { StaxUtils.writeTo(getDocument(wsdlDef), sink, 2); } catch (XMLStreamException e) { throw new RuntimeException(e); } } }
private InputSource convertToTmpInputSource(Element ele, String schemaLoc) throws Exception { InputSource result = null; ele.setAttributeNS(null, "schemaLocation", schemaLoc); File tmpFile = FileUtils.createTempFile("jaxbbinding", ".xml"); StaxUtils.writeTo(ele, Files.newOutputStream(tmpFile.toPath())); result = new InputSource(URIParserUtil.getAbsoluteURI(tmpFile.getAbsolutePath())); tmpFile.deleteOnExit(); return result; }
private InputSource convertToTmpInputSource(Element ele, String schemaLoc) throws Exception { InputSource result = null; ele.setAttribute("schemaLocation", schemaLoc); File tmpFile = FileUtils.createTempFile("jaxbbinding", ".xml"); StaxUtils.writeTo(ele, Files.newOutputStream(tmpFile.toPath())); result = new InputSource(URIParserUtil.getAbsoluteURI(tmpFile.getAbsolutePath())); tmpFile.deleteOnExit(); return result; }
private InputSource convertToTmpInputSource(Element ele, String schemaLoc) throws Exception { InputSource result = null; ele.setAttributeNS(null, "schemaLocation", schemaLoc); File tmpFile = FileUtils.createTempFile("jaxbbinding", ".xml"); StaxUtils.writeTo(ele, Files.newOutputStream(tmpFile.toPath())); result = new InputSource(URIParserUtil.getAbsoluteURI(tmpFile.getAbsolutePath())); tmpFile.deleteOnExit(); return result; }
private InputSource convertToTmpInputSource(Element ele, String schemaLoc) throws Exception { InputSource result = null; ele.setAttributeNS(null, "schemaLocation", schemaLoc); File tmpFile = FileUtils.createTempFile("jaxbbinding", ".xml"); StaxUtils.writeTo(ele, Files.newOutputStream(tmpFile.toPath())); result = new InputSource(URIParserUtil.getAbsoluteURI(tmpFile.getAbsolutePath())); tmpFile.deleteOnExit(); return result; }
tmpFile = FileUtils.createTempFile("customzied", ".xsd"); out = Files.newOutputStream(tmpFile.toPath()); StaxUtils.writeTo(rootElement, out); } catch (Exception e) { e.printStackTrace();
tmpFile = FileUtils.createTempFile("customzied", ".xsd"); out = Files.newOutputStream(tmpFile.toPath()); StaxUtils.writeTo(rootElement, out); } catch (Exception e) { e.printStackTrace();
public Object read(QName name, Node input, Class<?> type) { if (SAXSource.class.isAssignableFrom(type)) { XMLStreamReader reader = StaxUtils.createXMLStreamReader((Element)input); return new StaxSource(reader); } else if (StreamSource.class.isAssignableFrom(type)) { try (CachedOutputStream out = new CachedOutputStream()) { StaxUtils.writeTo(input, out); InputStream is = out.getInputStream(); return new StreamSource(is); } catch (IOException e) { throw new Fault("COULD_NOT_READ_XML_STREAM", LOG, e); } catch (XMLStreamException e) { throw new Fault("COULD_NOT_READ_XML_STREAM_CAUSED_BY", LOG, e, e.getClass().getCanonicalName(), e.getMessage()); } } return read(input); }
public Object read(QName name, Node input, Class<?> type) { if (SAXSource.class.isAssignableFrom(type)) { XMLStreamReader reader = StaxUtils.createXMLStreamReader((Element)input); return new StaxSource(reader); } else if (StreamSource.class.isAssignableFrom(type)) { try (CachedOutputStream out = new CachedOutputStream()) { StaxUtils.writeTo(input, out); InputStream is = out.getInputStream(); return new StreamSource(is); } catch (IOException e) { throw new Fault("COULD_NOT_READ_XML_STREAM", LOG, e); } catch (XMLStreamException e) { throw new Fault("COULD_NOT_READ_XML_STREAM_CAUSED_BY", LOG, e, e.getClass().getCanonicalName(), e.getMessage()); } } return read(input); }
StaxUtils.writeTo(newDoc, bos); return StaxUtils.read(bos.getInputStream());
StaxUtils.writeTo(newDoc, bos); return StaxUtils.read(bos.getInputStream());