String responseFormat = "application/xml";;
int status = HttpServletResponse.SC_OK;
ByteArrayOutputStream baos = new ByteArrayOutputStream();
try {
baos = new ByteArrayOutputStream();
IExtract jp2 = new KduExtractExe();
ImageRecord r = ReferentManager.getImageRecord(contextObject.getReferent());
String[] xml = jp2.getXMLBox(r);
StringBuffer sb = new StringBuffer("<?xml version=\"1.0\" encoding=\"UTF-8\"?>");
sb.append("<jp2:JP2XML ");
sb.append("xmlns:jp2=\"http://library.lanl.gov/2008-11/aDORe/JP2XML/\" ");
sb.append("xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" ");
sb.append("xsi:schemaLocation=\"http://library.lanl.gov/2008-11/aDORe/JP2XML/ ");