+ if (commandResponse.getContentType().contains("xml")) {\r
+ responseObject = ResponseParser.getParser().getDataObject((ClientCommandResponse)commandResponse);\r
+ if (ResponseParser.docTypes.contains(responseObject.getType())) {\r
+ logger.debug("Storing " + responseObject.getType() + " in pzresp. ");\r
+ } else {\r
+ logger.debug("Command was 'record' but response not '<record>' - assuming raw record response.");\r
+ ResponseDataObject recordResponse = new RecordResponse();\r
+ recordResponse.setType("record");\r
+ recordResponse.setXml(responseObject.getXml());\r
+ recordResponse.setAttribute("activeclients", "0");\r
+ responseObject = recordResponse;\r
+ }\r
+ } else if (commandResponse.isBinary()) {\r
+ responseObject = new RecordResponse();\r
+ responseObject.setType(getCommandName());\r
+ logger.info("Binary response");\r
+ responseObject.setAttribute("activeclients", "0");\r
+ responseObject.setXml("<record>binary response</record>");\r
+ responseObject.setBinary(commandResponse.getBytes());\r
+ } else {\r
+ logger.error("Response was not found to be XML or binary. The response was not handled.");\r
+ }\r
+ Pz2Service.get().getPzresp().put(getCommandName(), responseObject);\r