Map<ShoppingCartItem, BigDecimal> items = cart.getShipGroupItems(i);
for (Map.Entry<ShoppingCartItem, BigDecimal> entry : items.entrySet()) {
cart.positionItemToGroup(entry.getKey(), entry.getValue(), i, 0, false);
}
}
cart.cleanUpShipGroups();
cart.setShippingContactMechId(postalContactId);
Map<String, Object> result = ShippingEvents.getShipGroupEstimate(dispatcher, delegator, cart, 0);
if (result.get(ModelService.RESPONSE_MESSAGE).equals(ModelService.RESPOND_ERROR)) {
return ServiceUtil.returnError((String) result.get(ModelService.ERROR_MESSAGE));
}