@Test public void testSerializeData() throws Exception { Writer serializeData = bindingSerializer.serializeData(schemaContext, testedToasterNormalizedNodes); Assert.assertFalse(Strings.isNullOrEmpty(serializeData.toString())); LOG.info(serializeData.toString()); }
@Override public Writer serializeData(final SchemaNode schemaNode, final NormalizedNode<?, ?> normalizedNode) throws SerializationException { Writer writer = new StringWriter(); try (NormalizedNodeWriter normalizedNodeWriter = createNormalizedNodeWriter(schemaContext, writer, schemaNode.getPath())) { normalizedNodeWriter.write(normalizedNode); normalizedNodeWriter.flush(); } catch (IOException ioe) { throw new SerializationException(ioe); } return writer; }
XmlNodeConverter implements NodeConverter { @Override public Writer serializeData(final SchemaNode schemaNode, final NormalizedNode<?, ?> normalizedNode) throws SerializationException { Writer writer = new StringWriter(); try (NormalizedNodeWriter normalizedNodeWriter = createNormalizedNodeWriter(schemaContext, writer, schemaNode.getPath())) { normalizedNodeWriter.write(normalizedNode); normalizedNodeWriter.flush(); } catch (IOException ioe) { throw new SerializationException(ioe); } return writer; } }
XmlNodeConverter implements NodeConverter { @Override public Writer serializeData(final SchemaNode schemaNode, final NormalizedNode<?, ?> normalizedNode) throws SerializationException { Writer writer = new StringWriter(); try (NormalizedNodeWriter normalizedNodeWriter = createNormalizedNodeWriter(schemaContext, writer, schemaNode.getPath())) { normalizedNodeWriter.write(normalizedNode); normalizedNodeWriter.flush(); } catch (IOException ioe) { throw new SerializationException(ioe); } return writer; } XmlNodeConverter(final SchemaContext schemaContext); }
XmlNodeConverter implements NodeConverter { @Override public Writer serializeData(final SchemaNode schemaNode, final NormalizedNode<?, ?> normalizedNode) throws SerializationException { Writer writer = new StringWriter(); try (NormalizedNodeWriter normalizedNodeWriter = createNormalizedNodeWriter(schemaContext, writer, schemaNode.getPath())) { normalizedNodeWriter.write(normalizedNode); normalizedNodeWriter.flush(); } catch (IOException ioe) { throw new SerializationException(ioe); } return writer; } XmlNodeConverter(final SchemaContext schemaContext); @Override Writer serializeData(final SchemaNode schemaNode, final NormalizedNode<?, ?> normalizedNode); @Override Writer serializeRpc(final SchemaNode schemaNode, final NormalizedNode<?, ?> normalizedNode); @Override NormalizedNode<?, ?> deserialize(final SchemaNode schemaNode, final Reader inputData); static void closeQuietly(final XMLStreamReader xmlStreamReader); }
XmlNodeConverter implements NodeConverter { @Override public Writer serializeData(final SchemaNode schemaNode, final NormalizedNode<?, ?> normalizedNode) throws SerializationException { Writer writer = new StringWriter(); try (NormalizedNodeWriter normalizedNodeWriter = createNormalizedNodeWriter(schemaContext, writer, schemaNode.getPath())) { normalizedNodeWriter.write(normalizedNode); normalizedNodeWriter.flush(); } catch (IOException ioe) { throw new SerializationException(ioe); } return writer; } XmlNodeConverter(final SchemaContext schemaContext); @Override Writer serializeData(final SchemaNode schemaNode, final NormalizedNode<?, ?> normalizedNode); @Override Writer serializeRpc(final SchemaNode schemaNode, final NormalizedNode<?, ?> normalizedNode); @Override NormalizedNode<?, ?> deserialize(final SchemaNode schemaNode, final Reader inputData); static void closeQuietly(final XMLStreamReader xmlStreamReader);  }