Attachments attachment = response.getAttachmentMap();
dataHandler = attachment.getDataHandler(imageContentId);
File tempFile = File.createTempFile("swa-", ".gif");
FileOutputStream fos = new FileOutputStream(tempFile);
dataHandler.writeTo(fos);
fos.flush();
fos.close();
log.info("Saved response to file : " + tempFile.getAbsolutePath());
clientResult.incrementResponseCount();