コード例 #1
0
ファイル: RateWareGateway.cs プロジェクト: jpheary/Argix10
        public LTLRateShipmentResponse CalculateLTLRate(LTLRateShipmentRequest request)
        {
            //
            LTLRateShipmentResponse  response = null;
            RateWareXLPortTypeClient client   = new RateWareXLPortTypeClient();

            try {
                AuthenticationToken authToken = getAuthenticationToken();
                if (client.isReady(authToken))
                {
                    //LTL rate shipment request
                    response = client.LTLRateShipment(authToken, request);
                }
                client.Close();
            }
            catch (TimeoutException te) { client.Abort(); throw new ApplicationException(te.Message); }
            catch (FaultException fe) { client.Abort(); throw new ApplicationException(fe.Message); }
            catch (CommunicationException ce) { client.Abort(); throw new ApplicationException(ce.Message); }
            return(response);
        }