Class DhlServices
- java.lang.Object
-
- org.apache.ofbiz.shipment.thirdparty.dhl.DhlServices
-
public class DhlServices extends java.lang.Object
DHL ShipmentServicesImplementation of DHL US domestic shipment interface using DHL ShipIT XML APi.
Shipment services not supported in DHL ShipIT 1.1- Multiple Piece shipping (Shipment must not have more than one ShipmentPackage)
- Dynamic editing of previously submitted shipment (void first then resubmit instead)
- Label size 4"x6"
- Out of origin shipping
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
DHL_WEIGHT_UOM_ID
static java.lang.String
module
static java.lang.String
resourceError
static java.lang.String
shipmentPropertiesFile
-
Constructor Summary
Constructors Constructor Description DhlServices()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static org.w3c.dom.Document
createAccessRequestDocument(Delegator delegator, java.lang.String shipmentGatewayConfigId, java.lang.String resource)
static java.util.Map<java.lang.String,java.lang.Object>
dhlRateEstimate(DispatchContext dctx, java.util.Map<java.lang.String,? extends java.lang.Object> context)
static java.util.Map<java.lang.String,java.lang.Object>
dhlRegisterInquire(DispatchContext dctx, java.util.Map<java.lang.String,? extends java.lang.Object> context)
static java.util.Map<java.lang.String,java.lang.Object>
dhlShipmentConfirm(DispatchContext dctx, java.util.Map<java.lang.String,? extends java.lang.Object> context)
static java.util.Map<java.lang.String,java.lang.Object>
handleDhlRateResponse(org.w3c.dom.Document rateResponseDocument, java.util.Locale locale)
static java.util.Map<java.lang.String,java.lang.Object>
handleDhlRegisterResponse(org.w3c.dom.Document registerResponseDocument, java.util.Locale locale)
static java.util.Map<java.lang.String,java.lang.Object>
handleDhlShipmentConfirmResponse(java.lang.String rateResponseString, GenericValue shipmentRouteSegment, java.util.List<GenericValue> shipmentPackageRouteSegs, java.util.Locale locale)
static void
handleErrors(org.w3c.dom.Element responseElement, java.util.List<java.lang.Object> errorList, java.util.Locale locale)
static java.lang.String
sendDhlRequest(java.lang.String xmlString, Delegator delegator, java.lang.String shipmentGatewayConfigId, java.lang.String resource, java.util.Locale locale)
Opens a URL to DHL and makes a request.
-
-
-
Field Detail
-
module
public static final java.lang.String module
-
shipmentPropertiesFile
public static final java.lang.String shipmentPropertiesFile
- See Also:
- Constant Field Values
-
DHL_WEIGHT_UOM_ID
public static final java.lang.String DHL_WEIGHT_UOM_ID
- See Also:
- Constant Field Values
-
resourceError
public static final java.lang.String resourceError
- See Also:
- Constant Field Values
-
-
Method Detail
-
sendDhlRequest
public static java.lang.String sendDhlRequest(java.lang.String xmlString, Delegator delegator, java.lang.String shipmentGatewayConfigId, java.lang.String resource, java.util.Locale locale) throws org.apache.ofbiz.shipment.thirdparty.dhl.DhlConnectException
Opens a URL to DHL and makes a request.- Parameters:
xmlString
- Name of the DHL service to invokedelegator
- the delegatorshipmentGatewayConfigId
- the shipment gateway config idresource
- the resource file (i.e. shipment.properties)locale
- locale in use- Returns:
- XML string response from DHL
- Throws:
org.apache.ofbiz.shipment.thirdparty.dhl.DhlConnectException
-
dhlRateEstimate
public static java.util.Map<java.lang.String,java.lang.Object> dhlRateEstimate(DispatchContext dctx, java.util.Map<java.lang.String,? extends java.lang.Object> context)
-
handleDhlRateResponse
public static java.util.Map<java.lang.String,java.lang.Object> handleDhlRateResponse(org.w3c.dom.Document rateResponseDocument, java.util.Locale locale)
-
dhlRegisterInquire
public static java.util.Map<java.lang.String,java.lang.Object> dhlRegisterInquire(DispatchContext dctx, java.util.Map<java.lang.String,? extends java.lang.Object> context)
-
handleDhlRegisterResponse
public static java.util.Map<java.lang.String,java.lang.Object> handleDhlRegisterResponse(org.w3c.dom.Document registerResponseDocument, java.util.Locale locale)
-
dhlShipmentConfirm
public static java.util.Map<java.lang.String,java.lang.Object> dhlShipmentConfirm(DispatchContext dctx, java.util.Map<java.lang.String,? extends java.lang.Object> context)
-
handleDhlShipmentConfirmResponse
public static java.util.Map<java.lang.String,java.lang.Object> handleDhlShipmentConfirmResponse(java.lang.String rateResponseString, GenericValue shipmentRouteSegment, java.util.List<GenericValue> shipmentPackageRouteSegs, java.util.Locale locale) throws GenericEntityException
- Throws:
GenericEntityException
-
createAccessRequestDocument
public static org.w3c.dom.Document createAccessRequestDocument(Delegator delegator, java.lang.String shipmentGatewayConfigId, java.lang.String resource)
-
handleErrors
public static void handleErrors(org.w3c.dom.Element responseElement, java.util.List<java.lang.Object> errorList, java.util.Locale locale)
-
-