@Test public void testDeserialize() throws Exception { Object obj; Rdns rdns; String exMsg; try { obj = JaxbExp.deserialize(Rdns.class, xmlIn); } catch (Exception ex) { exMsg = Debug.getEST(ex); fail("Could not deseialize\n" + exMsg); return; } rdns = (Rdns) obj; Record home = rdns.getRecordsList().getRecords().get(0); Record someDomain = rdns.getRecordsList().getRecords().get(1); assertEquals(home.getName(), "www.home.org"); assertEquals(someDomain.getName(), "www.somedomain.org"); assertEquals(home.getData(), "127.0.0.1"); assertEquals(someDomain.getData(),"10.0.0.1"); }
public static Object deserialize(Class oClass, String xml) throws JAXBException { JAXBContext ctx = JAXBContext.newInstance(oClass); Unmarshaller u = ctx.createUnmarshaller(); return u.unmarshal(new StringReader(xml)); }
JaxbExp { public static Object deserialize(Class oClass, String xml) throws JAXBException { JAXBContext ctx = JAXBContext.newInstance(oClass); Unmarshaller u = ctx.createUnmarshaller(); return u.unmarshal(new StringReader(xml)); } }
JaxbExp { public static Object deserialize(Class oClass, String xml) throws JAXBException { JAXBContext ctx = JAXBContext.newInstance(oClass); Unmarshaller u = ctx.createUnmarshaller(); return u.unmarshal(new StringReader(xml)); }  }
JaxbExp { public static Object deserialize(Class oClass, String xml) throws JAXBException { JAXBContext ctx = JAXBContext.newInstance(oClass); Unmarshaller u = ctx.createUnmarshaller(); return u.unmarshal(new StringReader(xml)); }  static Object deserialize(Class oClass, String xml); static Object deserializeAryClasses(String xml, Class... oClasses); static Object deserialize(String xml); static String serialize(Object obj); static Class[] getObjClasses(); }
JaxbExp { public static Object deserialize(Class oClass, String xml) throws JAXBException { JAXBContext ctx = JAXBContext.newInstance(oClass); Unmarshaller u = ctx.createUnmarshaller(); return u.unmarshal(new StringReader(xml)); }  static Object deserialize(Class oClass, String xml); static Object deserializeAryClasses(String xml, Class... oClasses); static Object deserialize(String xml); static String serialize(Object obj); static Class[] getObjClasses(); static final int PAGESIZE; static final JAXBContext arryCtx; }