Class FedexServices


  • public class FedexServices
    extends java.lang.Object
    Fedex Shipment Services Implementation of Fedex shipment interface using Ship Manager Direct API TODO: FDXShipDeleteRequest/Reply (on error and via service call) TODO: FDXCloseRequest/Reply TODO: FDXRateRequest/Reply TODO: FDXTrackRequest/Reply TODO: International shipments TODO: Multi-piece shipments TODO: Freight shipments
    • Constructor Summary

      Constructors 
      Constructor Description
      FedexServices()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.util.Map<java.lang.String,​java.lang.Object> fedexShipRequest​(DispatchContext dctx, java.util.Map<java.lang.String,​? extends java.lang.Object> context)
      Send a FDXShipRequest via the Ship Manager Direct API
      static java.util.Map<java.lang.String,​java.lang.Object> fedexSubscriptionRequest​(DispatchContext dctx, java.util.Map<java.lang.String,​? extends java.lang.Object> context)
      Fedex subscription request map.
      static void handleErrors​(org.w3c.dom.Element rootElement, java.util.List<java.lang.Object> errorList, java.util.Locale locale)  
      static java.util.Map<java.lang.String,​java.lang.Object> handleFedexShipReply​(java.lang.String fDXShipReplyString, GenericValue shipmentRouteSegment, java.util.List<GenericValue> shipmentPackageRouteSegs, java.util.Locale locale)
      Extract the tracking number and shipping label from the FDXShipReply XML string
      static java.lang.String sendFedexRequest​(java.lang.String xmlString, Delegator delegator, java.lang.String shipmentGatewayConfigId, java.lang.String resource, java.util.Locale locale)
      Opens a URL to Fedex and makes a request.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • SHIPMENT_PROPERTIES_FILE

        public static final java.lang.String SHIPMENT_PROPERTIES_FILE
        See Also:
        Constant Field Values
    • Constructor Detail

      • FedexServices

        public FedexServices()
    • Method Detail

      • sendFedexRequest

        public static java.lang.String sendFedexRequest​(java.lang.String xmlString,
                                                        Delegator delegator,
                                                        java.lang.String shipmentGatewayConfigId,
                                                        java.lang.String resource,
                                                        java.util.Locale locale)
                                                 throws org.apache.ofbiz.shipment.thirdparty.fedex.FedexConnectException
        Opens a URL to Fedex and makes a request.
        Parameters:
        xmlString - XML message to send
        delegator - the delegator
        shipmentGatewayConfigId - the shipmentGatewayConfigId
        resource - RESOURCE file name
        Returns:
        XML string response from FedEx
        Throws:
        org.apache.ofbiz.shipment.thirdparty.fedex.FedexConnectException
      • fedexSubscriptionRequest

        public static java.util.Map<java.lang.String,​java.lang.Object> fedexSubscriptionRequest​(DispatchContext dctx,
                                                                                                      java.util.Map<java.lang.String,​? extends java.lang.Object> context)
        Fedex subscription request map. Register a Fedex account for shipping by obtaining the meter number
        Parameters:
        dctx - the dctx
        context - the context
        Returns:
        the map
      • fedexShipRequest

        public static java.util.Map<java.lang.String,​java.lang.Object> fedexShipRequest​(DispatchContext dctx,
                                                                                              java.util.Map<java.lang.String,​? extends java.lang.Object> context)
        Send a FDXShipRequest via the Ship Manager Direct API
      • handleFedexShipReply

        public static java.util.Map<java.lang.String,​java.lang.Object> handleFedexShipReply​(java.lang.String fDXShipReplyString,
                                                                                                  GenericValue shipmentRouteSegment,
                                                                                                  java.util.List<GenericValue> shipmentPackageRouteSegs,
                                                                                                  java.util.Locale locale)
                                                                                           throws GenericEntityException
        Extract the tracking number and shipping label from the FDXShipReply XML string
        Parameters:
        fDXShipReplyString -
        shipmentRouteSegment -
        shipmentPackageRouteSegs -
        Throws:
        GenericEntityException
      • handleErrors

        public static void handleErrors​(org.w3c.dom.Element rootElement,
                                        java.util.List<java.lang.Object> errorList,
                                        java.util.Locale locale)