Map<String, String> namespaceMap = new HashMap<String, String>();
namespaceMap.put("http://www.w3.org/2001/XMLSchema-instance", "xsins");
p.setNamespaceMap(namespaceMap);
Books2 books2 = new Books2();
books2.setBooks(Collections.singletonList(
new SuperBook("CXF Rocks", 123L, 124L)));
ByteArrayOutputStream os = new ByteArrayOutputStream();
p.writeTo(books2, (Class)Books2.class, Books2.class, Books2.class.getAnnotations(),
MediaType.APPLICATION_JSON_TYPE, new MetadataMap<String, Object>(), os);
String s = os.toString();