new ValidationRule(ValidationRule.VALIDATION_TYPE_MANDATORY_TEL, "senderAddress", senderAddress),
new ValidationRule(ValidationRule.VALIDATION_TYPE_MANDATORY, "requestId", requestId),
};
if (checkRequestParameters(response, rules)) {
DeliveryInfoList deliveryInfoList=new DeliveryInfoList();
String resourceURL=getRequestHostnameAndContext(request)+request.getServletPath()+"/1/messaging/outbound/"+urlEncode(senderAddress)+"/requests/"+urlEncode(requestId)+"/deliveryInfos";
deliveryInfoList.setResourceURL(resourceURL);
DeliveryInfoList.DeliveryInfo[] deliveryInfo=new DeliveryInfoList.DeliveryInfo[5];
deliveryInfo[0]=new DeliveryInfoList.DeliveryInfo("tel:+12300001", DELIVERYIMPOSSIBLE);
deliveryInfo[1]=new DeliveryInfoList.DeliveryInfo("tel:+12300002", DELIVEREDTONETWORK);
deliveryInfo[2]=new DeliveryInfoList.DeliveryInfo("tel:+12300003", DELIVEREDTOTERMINAL);
deliveryInfo[3]=new DeliveryInfoList.DeliveryInfo("tel:+12300004", DELIVERYUNCERTAIN);
deliveryInfo[4]=new DeliveryInfoList.DeliveryInfo("tel:+12300005", MESSAGEWAITING);
deliveryInfoList.setDeliveryInfo(deliveryInfo);
ObjectMapper mapper=new ObjectMapper();
String jsonResponse="{\"deliveryInfoList\":"+mapper.writeValueAsString(deliveryInfoList)+"}";
sendJSONResponse(response, jsonResponse, OK, null);