// get the service type from the CarrierShipmentMethod
String shipmentMethodTypeId = shipmentRouteSegment.getString("shipmentMethodTypeId");
String partyId = shipmentRouteSegment.getString("carrierPartyId");
String csmKeystring = "[" + shipmentMethodTypeId + "," + partyId + ",CARRIER]";
GenericValue carrierShipmentMethod = delegator.findByPrimaryKey("CarrierShipmentMethod",
UtilMisc.toMap("partyId", partyId, "roleTypeId", "CARRIER", "shipmentMethodTypeId", shipmentMethodTypeId));
if (carrierShipmentMethod == null) {
return ServiceUtil.returnError("CarrierShipmentMethod " + csmKeystring +
" not found for ShipmentRouteSegment " + srsKeyString);
}