* @return AMFMessage
* @throws IOException
* @throws ServletException
*/
private AMFMessage processMessage(HttpServlet servlet, HttpServletRequest req, HttpServletResponse rsp, AMFMessage message) {
AMFMessage responseMessage = new AMFMessage();
for (Iterator bodies = message.getBodies(); bodies.hasNext();) {
AMFBody requestBody = (AMFBody) bodies.next();
// invoke
Object serviceResult = invokeBody(servlet,req, rsp, requestBody);
String target = getTarget(requestBody, serviceResult);
AMFBody responseBody = new AMFBody(target, "null", serviceResult);
responseMessage.addBody(responseBody);
}
return responseMessage;
}