@Test public void testSerialize() throws Exception { Rdns rdns = DnsMockObjectGenerator.newRdns(); String xml; String exMsg; try { xml = JaxbExp.serialize(rdns); } catch (Exception ex) { exMsg = Debug.getEST(ex); fail("could not Serailize\n" + exMsg); } }
public static String serialize(Object obj) throws JAXBException { Class oClass = obj.getClass(); StringWriter sw = new StringWriter(PAGESIZE); JAXBContext ctx = JAXBContext.newInstance(oClass); Marshaller m = ctx.createMarshaller(); m.marshal(obj, sw); return sw.toString(); }
JaxbExp { public static String serialize(Object obj) throws JAXBException { Class oClass = obj.getClass(); StringWriter sw = new StringWriter(PAGESIZE); JAXBContext ctx = JAXBContext.newInstance(oClass); Marshaller m = ctx.createMarshaller(); m.marshal(obj, sw); return sw.toString(); } }
JaxbExp { public static String serialize(Object obj) throws JAXBException { Class oClass = obj.getClass(); StringWriter sw = new StringWriter(PAGESIZE); JAXBContext ctx = JAXBContext.newInstance(oClass); Marshaller m = ctx.createMarshaller(); m.marshal(obj, sw); return sw.toString(); }  }
JaxbExp { public static String serialize(Object obj) throws JAXBException { Class oClass = obj.getClass(); StringWriter sw = new StringWriter(PAGESIZE); JAXBContext ctx = JAXBContext.newInstance(oClass); Marshaller m = ctx.createMarshaller(); m.marshal(obj, sw); return sw.toString(); }  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 String serialize(Object obj) throws JAXBException { Class oClass = obj.getClass(); StringWriter sw = new StringWriter(PAGESIZE); JAXBContext ctx = JAXBContext.newInstance(oClass); Marshaller m = ctx.createMarshaller(); m.marshal(obj, sw); return sw.toString(); }  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; }