@Test public void testMaps() { final String xmlMaps = "<test>" + "<key1>" + "<ek1>ev1</ek1>" + "<ek2>ev2</ek2>" + "</key1>" + "</test>"; EntityBody body = null; try { body = deserialize(xmlMaps); } catch (XMLStreamException e) { fail(e.getMessage()); } assertNotNull(body); assertTrue("Should be a map", body.get("key1") instanceof Map); @SuppressWarnings("unchecked") final Map<String, Object> map = (Map<String, Object>) body.get("key1"); assertEquals("ev1", map.get("ek1")); assertEquals("ev2", map.get("ek2")); }
public EntityBody deserialize(final InputStream body) throws XMLStreamException { final XMLInputFactory factory = XMLInputFactory.newInstance(); final XMLStreamReader reader = factory.createXMLStreamReader(body); try { return readDocument(reader); } finally { reader.close(); } }
StAXMsgBodyReader { public EntityBody deserialize(final InputStream body) throws XMLStreamException { final XMLInputFactory factory = XMLInputFactory.newInstance(); final XMLStreamReader reader = factory.createXMLStreamReader(body); try { return readDocument(reader); } finally { reader.close(); } } }
StAXMsgBodyReader { public EntityBody deserialize(final InputStream body) throws XMLStreamException { final XMLInputFactory factory = XMLInputFactory.newInstance(); final XMLStreamReader reader = factory.createXMLStreamReader(body); try { return readDocument(reader); } finally { reader.close(); } }  }
StAXMsgBodyReader { public EntityBody deserialize(final InputStream body) throws XMLStreamException { final XMLInputFactory factory = XMLInputFactory.newInstance(); final XMLStreamReader reader = factory.createXMLStreamReader(body); try { return readDocument(reader); } finally { reader.close(); } }  EntityBody deserialize(final InputStream body); }
StAXMsgBodyReader { public EntityBody deserialize(final InputStream body) throws XMLStreamException { final XMLInputFactory factory = XMLInputFactory.newInstance(); final XMLStreamReader reader = factory.createXMLStreamReader(body); try { return readDocument(reader); } finally { reader.close(); } }  EntityBody deserialize(final InputStream body);  }