}
xmlRpcException = new XmlRpcInternalException(
"Server error. Internal xml-rpc error");
}
XmlRpcResponse xmlRpcResponse = null;
if (xmlRpcException == null) {
XmlRpcElement parameter = xmlRpcElementFactory
.createXmlRpcElement(result);
xmlRpcResponse = new XmlRpcResponse(parameter);
} else {
XmlRpcFault xmlRpcFault = new XmlRpcFault(xmlRpcException.getCode(),
xmlRpcException.getMessage());
xmlRpcResponse = new XmlRpcResponse(xmlRpcFault);
}
byte[] serializedResponse = responseWriter.writeResponse(xmlRpcResponse);
response.setContentType("text/xml");