Ejemplo n.º 1
0
        public static ResponseQuote ParseXmlCapability(string respString)
        {
            XmlDocument doc = new XmlDocument();

            doc.LoadXml(respString);

            ResponseQuote quote = new ResponseQuote();

            quote.BkgDetails = new BkgDetailsResp();
            quote.Srvs       = new List <Service>();

            quote.BkgDetails.OriginServiceArea = new ServiceArea();

            XmlNode bkgDetails = doc.SelectSingleNode("//BkgDetails");
            XmlNode srvs       = doc.SelectSingleNode("//Srvs");

            // <OriginServiceArea>
            XmlNode FacilityCode = bkgDetails.SelectSingleNode("OriginServiceArea//FacilityCode");

            quote.BkgDetails.OriginServiceArea.FacilityCode = FacilityCode.InnerText;

            XmlNode ServiceAreaCode = bkgDetails.SelectSingleNode("OriginServiceArea//ServiceAreaCode");

            quote.BkgDetails.OriginServiceArea.ServiceAreaCode = ServiceAreaCode.InnerText;

            quote.BkgDetails.DestinationServiceArea = new ServiceArea();

            // <DestinationServiceArea>
            XmlNode DestFacilityCode = bkgDetails.SelectSingleNode("DestinationServiceArea//FacilityCode");

            quote.BkgDetails.DestinationServiceArea.FacilityCode = DestFacilityCode.InnerText;

            XmlNode DestServiceAreaCode = bkgDetails.SelectSingleNode("DestinationServiceArea//ServiceAreaCode");

            quote.BkgDetails.DestinationServiceArea.ServiceAreaCode = DestServiceAreaCode.InnerText;


            // <QtdShp>
            XmlNodeList qtdShpList = bkgDetails.SelectNodes("QtdShp");

            quote.BkgDetails.QtdShps = new List <QtdShpResp>();

            foreach (XmlNode qtdShp in qtdShpList)
            {
                XmlNode GlobalProductCode     = qtdShp.SelectSingleNode("GlobalProductCode");
                XmlNode LocalProductCode      = qtdShp.SelectSingleNode("LocalProductCode");
                XmlNode ProductShortName      = qtdShp.SelectSingleNode("ProductShortName");
                XmlNode LocalProductName      = qtdShp.SelectSingleNode("LocalProductName");
                XmlNode NetworkTypeCode       = qtdShp.SelectSingleNode("NetworkTypeCode");
                XmlNode POfferedCustAgreement = qtdShp.SelectSingleNode("POfferedCustAgreement");
                XmlNode TransInd                  = qtdShp.SelectSingleNode("TransInd");
                XmlNode PickupDate                = qtdShp.SelectSingleNode("PickupDate");
                XmlNode PickupCutoffTime          = qtdShp.SelectSingleNode("PickupCutoffTime");
                XmlNode BookingTime               = qtdShp.SelectSingleNode("BookingTime");
                XmlNode CurrencyCode              = qtdShp.SelectSingleNode("CurrencyCode");
                XmlNode ExchangeRate              = qtdShp.SelectSingleNode("ExchangeRate");
                XmlNode WeightCharge              = qtdShp.SelectSingleNode("WeightCharge");
                XmlNode WeightChargeTax           = qtdShp.SelectSingleNode("WeightChargeTax");
                XmlNode TotalTransitDays          = qtdShp.SelectSingleNode("TotalTransitDays");
                XmlNode PickupPostalLocAddDays    = qtdShp.SelectSingleNode("PickupPostalLocAddDays");
                XmlNode DeliveryPostalLocAddDays  = qtdShp.SelectSingleNode("DeliveryPostalLocAddDays");
                XmlNode PickupNonDHLCourierCode   = qtdShp.SelectSingleNode("PickupNonDHLCourierCode");
                XmlNode DeliveryNonDHLCourierCode = qtdShp.SelectSingleNode("DeliveryNonDHLCourierCode");
                XmlNode DeliveryDate              = qtdShp.SelectSingleNode("DeliveryDate");
                XmlNode DeliveryTime              = qtdShp.SelectSingleNode("DeliveryTime");
                XmlNode DimensionalWeight         = qtdShp.SelectSingleNode("DimensionalWeight");
                XmlNode WeightUnit                = qtdShp.SelectSingleNode("WeightUnit");
                XmlNode PickupDayOfWeekNum        = qtdShp.SelectSingleNode("PickupDayOfWeekNum");
                XmlNode DestinationDayOfWeekNum   = qtdShp.SelectSingleNode("DestinationDayOfWeekNum");

                // set to quote class
                QtdShpResp qShp = new QtdShpResp();
                qShp.GlobalProductCode     = GlobalProductCode.InnerText;
                qShp.LocalProductCode      = LocalProductCode.InnerText;
                qShp.ProductShortName      = ProductShortName.InnerText;
                qShp.LocalProductName      = LocalProductName.InnerText;
                qShp.NetworkTypeCode       = NetworkTypeCode.InnerText;
                qShp.POfferedCustAgreement = POfferedCustAgreement.InnerText;
                qShp.TransInd         = TransInd.InnerText;
                qShp.PickupDate       = PickupDate.InnerText;
                qShp.PickupCutoffTime = PickupCutoffTime.InnerText;
                qShp.BookingTime      = BookingTime.InnerText;
                qShp.CurrencyCode     = CurrencyCode.InnerText;

                qShp.ExchangeRate = ExchangeRate != null?Convert.ToDecimal(ExchangeRate.InnerText) : (Decimal?)null;

                qShp.WeightCharge             = Convert.ToDecimal(WeightCharge.InnerText);
                qShp.WeightChargeTax          = Convert.ToDecimal(WeightChargeTax.InnerText);
                qShp.TotalTransitDays         = TotalTransitDays.InnerText;
                qShp.PickupPostalLocAddDays   = PickupPostalLocAddDays.InnerText;
                qShp.DeliveryPostalLocAddDays = DeliveryPostalLocAddDays.InnerText;
                qShp.DeliveryDate             = DeliveryDate.InnerText;
                qShp.DeliveryTime             = DeliveryTime.InnerText;
                qShp.DimensionalWeight        = DimensionalWeight.InnerText;
                qShp.WeightUnit              = WeightUnit.InnerText;
                qShp.PickupDayOfWeekNum      = PickupDayOfWeekNum.InnerText;
                qShp.DestinationDayOfWeekNum = DestinationDayOfWeekNum.InnerText;

                // <QtdShpExChrg>
                qShp.QtdShpExChrgs = new List <QtdShpExChrg>();
                XmlNodeList qtdShpChrgList = qtdShp.SelectNodes("QtdShpExChrg");
                foreach (XmlNode qtdShpChrg in qtdShpChrgList)
                {
                    QtdShpExChrg qtdShpExChrg = new QtdShpExChrg();

                    XmlNode SpecialServiceType   = qtdShpChrg.SelectSingleNode("SpecialServiceType");
                    XmlNode LocalServiceType     = qtdShpChrg.SelectSingleNode("LocalServiceType");
                    XmlNode GlobalServiceName    = qtdShpChrg.SelectSingleNode("GlobalServiceName");
                    XmlNode LocalServiceTypeName = qtdShpChrg.SelectSingleNode("LocalServiceTypeName");
                    XmlNode ChargeCodeType       = qtdShpChrg.SelectSingleNode("ChargeCodeType");
                    XmlNode CurrencyCode3        = qtdShpChrg.SelectSingleNode("CurrencyCode");
                    XmlNode ChargeValue          = qtdShpChrg.SelectSingleNode("ChargeValue");
                    XmlNode ChargeTaxAmount      = qtdShpChrg.SelectSingleNode("ChargeTaxAmount");

                    // <QtdShpExChrg> <ChargeTaxAmountDet>

                    XmlNode chargeTaxAmountDet = qtdShpChrg.SelectSingleNode("ChargeTaxAmountDet");
                    XmlNode TaxTypeRate3       = chargeTaxAmountDet.SelectSingleNode("TaxTypeRate");
                    XmlNode TaxTypeCode3       = chargeTaxAmountDet.SelectSingleNode("TaxTypeCode");
                    XmlNode TaxAmount          = chargeTaxAmountDet.SelectSingleNode("TaxAmount");
                    XmlNode BaseAmount         = chargeTaxAmountDet.SelectSingleNode("BaseAmount");

                    // set to quote class
                    qtdShpExChrg.SpecialServiceType   = SpecialServiceType.InnerText;
                    qtdShpExChrg.LocalServiceType     = LocalServiceType.InnerText;
                    qtdShpExChrg.GlobalServiceName    = GlobalServiceName.InnerText;
                    qtdShpExChrg.LocalServiceTypeName = LocalServiceTypeName.InnerText;
                    qtdShpExChrg.ChargeCodeType       = ChargeCodeType.InnerText;
                    qtdShpExChrg.CurrencyCode         = CurrencyCode3.InnerText;
                    qtdShpExChrg.ChargeValue          = Convert.ToDecimal(ChargeValue.InnerText);
                    qtdShpExChrg.ChargeTaxAmount      = Convert.ToDecimal(ChargeTaxAmount.InnerText);

                    qtdShpExChrg.ChargeTaxAmountDet             = new ChargeTaxAmountDet();
                    qtdShpExChrg.ChargeTaxAmountDet.TaxTypeRate = Convert.ToDecimal(TaxTypeRate3.InnerText);
                    qtdShpExChrg.ChargeTaxAmountDet.TaxTypeCode = TaxTypeCode3.InnerText;
                    qtdShpExChrg.ChargeTaxAmountDet.TaxAmount   = Convert.ToDecimal(TaxAmount.InnerText);
                    qtdShpExChrg.ChargeTaxAmountDet.BaseAmount  = Convert.ToDecimal(BaseAmount.InnerText);

                    qtdShpExChrg.QtdSExtrChrgInAdCurList = new List <QtdSExtrChrgInAdCur>();

                    // <QtdShpExChrg> <QtdSExtrChrgInAdCur>
                    XmlNodeList qtdSExtrChrgInAdCurList = qtdShpChrg.SelectNodes("QtdSExtrChrgInAdCur");
                    foreach (XmlNode qtdSExtrChrgInAdCur in qtdSExtrChrgInAdCurList)
                    {
                        QtdSExtrChrgInAdCur adCur = new QtdSExtrChrgInAdCur();

                        XmlNode ChargeValue2          = qtdSExtrChrgInAdCur.SelectSingleNode("ChargeValue");
                        XmlNode ChargeTaxAmount2      = qtdSExtrChrgInAdCur.SelectSingleNode("ChargeTaxAmount");
                        XmlNode CurrencyCode4         = qtdSExtrChrgInAdCur.SelectSingleNode("CurrencyCode");
                        XmlNode CurrencyRoleTypeCode2 = qtdSExtrChrgInAdCur.SelectSingleNode("CurrencyRoleTypeCode");

                        XmlNode chargeTaxAmountDet2 = qtdSExtrChrgInAdCur.SelectSingleNode("ChargeTaxAmountDet");

                        XmlNode TaxTypeRate4 = chargeTaxAmountDet2.SelectSingleNode("TaxTypeRate");
                        XmlNode TaxTypeCode4 = chargeTaxAmountDet2.SelectSingleNode("TaxTypeCode");
                        XmlNode TaxAmount2   = chargeTaxAmountDet2.SelectSingleNode("TaxAmount");
                        XmlNode BaseAmount2  = chargeTaxAmountDet2.SelectSingleNode("BaseAmount");

                        adCur.ChargeValue          = Convert.ToDecimal(ChargeValue2.InnerText);
                        adCur.ChargeTaxAmount      = Convert.ToDecimal(ChargeTaxAmount2.InnerText);
                        adCur.CurrencyCode         = CurrencyCode4.InnerText;
                        adCur.CurrencyRoleTypeCode = CurrencyRoleTypeCode2.InnerText;

                        adCur.ChargeTaxAmountDet = new ChargeTaxAmountDet();

                        adCur.ChargeTaxAmountDet.TaxTypeRate = Convert.ToDecimal(TaxTypeRate4.InnerText);
                        adCur.ChargeTaxAmountDet.TaxTypeCode = TaxTypeCode4.InnerText;
                        adCur.ChargeTaxAmountDet.TaxAmount   = Convert.ToDecimal(TaxAmount2.InnerText);
                        adCur.ChargeTaxAmountDet.BaseAmount  = Convert.ToDecimal(BaseAmount2.InnerText);

                        qtdShpExChrg.QtdSExtrChrgInAdCurList.Add(adCur);
                    }
                    qShp.QtdShpExChrgs.Add(qtdShpExChrg);
                }

                XmlNode PricingDate    = qtdShp.SelectSingleNode("PricingDate");
                XmlNode ShippingCharge = qtdShp.SelectSingleNode("ShippingCharge");
                XmlNode TotalTaxAmount = qtdShp.SelectSingleNode("TotalTaxAmount");

                qShp.PricingDate    = PricingDate.InnerText;
                qShp.ShippingCharge = Convert.ToDecimal(ShippingCharge.InnerText);
                qShp.TotalTaxAmount = Convert.ToDecimal(TotalTaxAmount.InnerText);

                // <QtdSInAdCur>
                XmlNodeList qtdSInAdCurList = qtdShp.SelectNodes("QtdSInAdCur");
                qShp.QtdSInAdCurList = new List <QtdSInAdCur>();
                foreach (XmlNode qtdSInAdCur in qtdSInAdCurList)
                {
                    QtdSInAdCur AdCur = new QtdSInAdCur();

                    XmlNode CurrencyCode2        = qtdSInAdCur.SelectSingleNode("CurrencyCode");
                    XmlNode CurrencyRoleTypeCode = qtdSInAdCur.SelectSingleNode("CurrencyRoleTypeCode");
                    XmlNode WeightCharge2        = qtdSInAdCur.SelectSingleNode("WeightCharge");
                    XmlNode TotalAmount          = qtdSInAdCur.SelectSingleNode("TotalAmount");
                    XmlNode TotalTaxAmount2      = qtdSInAdCur.SelectSingleNode("TotalTaxAmount");
                    XmlNode WeightChargeTax2     = qtdSInAdCur.SelectSingleNode("WeightChargeTax");

                    // <QtdSInAdCur> <WeightChargeTaxDet>
                    XmlNode weightChargeTaxDet = qtdSInAdCur.SelectSingleNode("WeightChargeTaxDet");
                    XmlNode TaxTypeRate        = weightChargeTaxDet.SelectSingleNode("TaxTypeRate");
                    XmlNode TaxTypeCode        = weightChargeTaxDet.SelectSingleNode("TaxTypeCode");
                    XmlNode WeightChargeTax3   = weightChargeTaxDet.SelectSingleNode("WeightChargeTax");
                    XmlNode BaseAmt            = weightChargeTaxDet.SelectSingleNode("BaseAmt");

                    AdCur.CurrencyCode         = CurrencyCode2.InnerText;
                    AdCur.CurrencyRoleTypeCode = CurrencyRoleTypeCode.InnerText;
                    AdCur.WeightCharge         = Convert.ToDecimal(WeightCharge2.InnerText);
                    AdCur.TotalAmount          = Convert.ToDecimal(TotalAmount.InnerText);
                    AdCur.TotalTaxAmount       = Convert.ToDecimal(TotalTaxAmount2.InnerText);
                    AdCur.WeightChargeTax      = Convert.ToDecimal(WeightChargeTax2.InnerText);

                    AdCur.WeightChargeTaxDet                 = new WeightChargeTaxDet();
                    AdCur.WeightChargeTaxDet.TaxTypeRate     = Convert.ToDecimal(TaxTypeRate.InnerText);
                    AdCur.WeightChargeTaxDet.TaxTypeCode     = TaxTypeCode.InnerText;
                    AdCur.WeightChargeTaxDet.WeightChargeTax = Convert.ToDecimal(WeightChargeTax3.InnerText);
                    AdCur.WeightChargeTaxDet.BaseAmt         = Convert.ToDecimal(BaseAmt.InnerText);

                    qShp.QtdSInAdCurList.Add(AdCur);
                }

                XmlNode weightChargeTaxDet2 = qtdShp.SelectSingleNode("WeightChargeTaxDet");
                XmlNode TaxTypeRate2        = weightChargeTaxDet2.SelectSingleNode("TaxTypeRate");
                XmlNode TaxTypeCode2        = weightChargeTaxDet2.SelectSingleNode("TaxTypeCode");
                XmlNode WeightChargeTax4    = weightChargeTaxDet2.SelectSingleNode("WeightChargeTax");
                XmlNode BaseAmt2            = weightChargeTaxDet2.SelectSingleNode("BaseAmt");

                qShp.WeightChargeTaxDet                 = new WeightChargeTaxDet();
                qShp.WeightChargeTaxDet.TaxTypeRate     = Convert.ToDecimal(TaxTypeRate2.InnerText);
                qShp.WeightChargeTaxDet.TaxTypeCode     = TaxTypeCode2.InnerText;
                qShp.WeightChargeTaxDet.WeightChargeTax = Convert.ToDecimal(WeightChargeTax4.InnerText);
                qShp.WeightChargeTaxDet.BaseAmt         = Convert.ToDecimal(BaseAmt2.InnerText);

                quote.BkgDetails.QtdShps.Add(qShp);
            }

            //  <Srvs>

            XmlNodeList srvList = srvs.SelectNodes("Srv");

            foreach (XmlNode srv in srvList)
            {
                Service service = new Service();

                XmlNode     GlobalProductCode = srv.SelectSingleNode("GlobalProductCode");
                XmlNodeList mrkSrvList        = srv.SelectNodes("MrkSrv");

                service.GlobalProductCode = GlobalProductCode.InnerText;
                service.MrkSrvs           = new List <MrkSrv>();

                foreach (XmlNode mrkSrv in mrkSrvList)
                {
                    MrkSrv mrkService = new MrkSrv();

                    XmlNode LocalProductCode      = mrkSrv.SelectSingleNode("LocalProductCode");
                    XmlNode ProductShortName      = mrkSrv.SelectSingleNode("ProductShortName");
                    XmlNode LocalProductName      = mrkSrv.SelectSingleNode("LocalProductName");
                    XmlNode NetworkTypeCode       = mrkSrv.SelectSingleNode("NetworkTypeCode");
                    XmlNode POfferedCustAgreement = mrkSrv.SelectSingleNode("POfferedCustAgreement");
                    XmlNode TransInd = mrkSrv.SelectSingleNode("TransInd");

                    XmlNode LocalServiceType     = mrkSrv.SelectSingleNode("LocalServiceType");
                    XmlNode GlobalServiceName    = mrkSrv.SelectSingleNode("GlobalServiceName");
                    XmlNode LocalServiceTypeName = mrkSrv.SelectSingleNode("LocalServiceTypeName");
                    XmlNode ChargeCodeType       = mrkSrv.SelectSingleNode("ChargeCodeType");
                    XmlNode MrkSrvInd            = mrkSrv.SelectSingleNode("MrkSrvInd");



                    mrkService.LocalProductCode      = LocalProductCode != null ? LocalProductCode.InnerText : null;
                    mrkService.ProductShortName      = ProductShortName != null ? ProductShortName.InnerText : null;
                    mrkService.LocalProductName      = LocalProductName != null ? LocalProductName.InnerText : null;
                    mrkService.NetworkTypeCode       = NetworkTypeCode != null ? NetworkTypeCode.InnerText : null;
                    mrkService.POfferedCustAgreement = POfferedCustAgreement != null ? POfferedCustAgreement.InnerText : null;
                    mrkService.TransInd = TransInd != null ? TransInd.InnerText : null;

                    mrkService.LocalServiceType     = LocalServiceType != null ? LocalServiceType.InnerText : null;
                    mrkService.GlobalServiceName    = GlobalServiceName != null ? GlobalServiceName.InnerText : null;
                    mrkService.LocalServiceTypeName = LocalServiceTypeName != null ? LocalServiceTypeName.InnerText : null;
                    mrkService.ChargeCodeType       = ChargeCodeType != null ? ChargeCodeType.InnerText : null;
                    mrkService.MrkSrvInd            = MrkSrvInd != null ? MrkSrvInd.InnerText : null;


                    service.MrkSrvs.Add(mrkService);
                }
                quote.Srvs.Add(service);
            }

            return(quote);
        }
Ejemplo n.º 2
0
        private static void OutputQuoteResponse(ResponseQuote info)
        {
            ServiceArea osa = info.BkgDetails.OriginServiceArea;

            Console.WriteLine("Origin Service Area:\n");
            Console.WriteLine("FacilityCode: {0}", osa.FacilityCode);
            Console.WriteLine("ServiceAreaCode: {0}", osa.ServiceAreaCode);
            Console.WriteLine("-----------------");

            ServiceArea dsa = info.BkgDetails.DestinationServiceArea;

            Console.WriteLine("Destination Service Area:\n");
            Console.WriteLine("FacilityCode: {0}", dsa.FacilityCode);
            Console.WriteLine("ServiceAreaCode: {0}", dsa.ServiceAreaCode);
            Console.WriteLine("-----------------");

            foreach (var qtdShp in info.BkgDetails.QtdShps)
            {
                Console.WriteLine("QtdShp:\n");
                Console.WriteLine("PickupDate: {0}", qtdShp.PickupDate);
                Console.WriteLine("PickupCutoffTime: {0}", qtdShp.PickupCutoffTime);
                Console.WriteLine("BookingTime: {0}", qtdShp.BookingTime);
                Console.WriteLine("CurrencyCode: {0}", qtdShp.CurrencyCode);
                Console.WriteLine("ExchangeRate: {0}", qtdShp.ExchangeRate);
                Console.WriteLine("WeightCharge: {0}", qtdShp.WeightCharge);
                Console.WriteLine("WeightChargeTax: {0}", qtdShp.WeightChargeTax);
                Console.WriteLine("TotalTransitDays: {0}", qtdShp.TotalTransitDays);
                Console.WriteLine("PickupPostalLocAddDays: {0}", qtdShp.PickupPostalLocAddDays);
                Console.WriteLine("DeliveryPostalLocAddDays: {0}", qtdShp.DeliveryPostalLocAddDays);
                Console.WriteLine("DeliveryDate: {0}", qtdShp.DeliveryDate);
                Console.WriteLine("DeliveryTime: {0}", qtdShp.DeliveryTime);
                Console.WriteLine("DimensionalWeight: {0}", qtdShp.DimensionalWeight);
                Console.WriteLine("WeightUnit: {0}", qtdShp.WeightUnit);
                Console.WriteLine("PickupDayOfWeekNum: {0}", qtdShp.PickupDayOfWeekNum);
                Console.WriteLine("DestinationDayOfWeekNum: {0}", qtdShp.DestinationDayOfWeekNum);
                Console.WriteLine("-----------------");

                if (qtdShp.QtdShpExChrgs != null)
                {
                    foreach (var chrg in qtdShp.QtdShpExChrgs)
                    {
                        Console.WriteLine("QtdShpExChrg:\n");
                        Console.WriteLine("SpecialServiceType: {0}", chrg.SpecialServiceType);
                        Console.WriteLine("LocalServiceType: {0}", chrg.LocalServiceType);
                        Console.WriteLine("GlobalServiceName: {0}", chrg.GlobalServiceName);
                        Console.WriteLine("LocalServiceTypeName: {0}", chrg.LocalServiceTypeName);
                        Console.WriteLine("ChargeCodeType: {0}", chrg.ChargeCodeType);
                        Console.WriteLine("CurrencyCode: {0}", chrg.CurrencyCode);
                        Console.WriteLine("ChargeValue: {0}", chrg.ChargeValue);
                        Console.WriteLine("ChargeTaxAmount: {0}", chrg.ChargeTaxAmount);

                        Console.WriteLine("TaxTypeRate: {0}", chrg.ChargeTaxAmountDet.TaxTypeRate);
                        Console.WriteLine("TaxTypeCode: {0}", chrg.ChargeTaxAmountDet.TaxTypeCode);
                        Console.WriteLine("TaxAmount: {0}", chrg.ChargeTaxAmountDet.TaxAmount);
                        Console.WriteLine("BaseAmount: {0}", chrg.ChargeTaxAmountDet.BaseAmount);
                        Console.WriteLine("-----------------");


                        foreach (var adCur in chrg.QtdSExtrChrgInAdCurList)
                        {
                            Console.WriteLine("QtdSExtrChrgInAdCur:\n");
                            Console.WriteLine("ChargeValue: {0}", adCur.ChargeValue);
                            Console.WriteLine("ChargeTaxAmount: {0}", adCur.ChargeTaxAmount);
                            Console.WriteLine("CurrencyCode: {0}", adCur.CurrencyCode);
                            Console.WriteLine("CurrencyRoleTypeCode: {0}", adCur.CurrencyRoleTypeCode);

                            Console.WriteLine("TaxTypeRate: {0}", adCur.ChargeTaxAmountDet.TaxTypeRate);
                            Console.WriteLine("TaxTypeCode: {0}", adCur.ChargeTaxAmountDet.TaxTypeCode);
                            Console.WriteLine("TaxAmount: {0}", adCur.ChargeTaxAmountDet.TaxAmount);
                            Console.WriteLine("BaseAmount: {0}", adCur.ChargeTaxAmountDet.BaseAmount);
                            Console.WriteLine("-----------------");
                        }

                        Console.WriteLine("-----------------");
                    }
                }
                Console.WriteLine("PricingDate: {0}", qtdShp.PricingDate);
                Console.WriteLine("ShippingCharge: {0}", qtdShp.ShippingCharge);
                Console.WriteLine("TotalTaxAmount: {0}", qtdShp.TotalTaxAmount);

                foreach (var adCur in qtdShp.QtdSInAdCurList)
                {
                    Console.WriteLine("QtdSInAdCur:\n");
                    Console.WriteLine("CurrencyCode: {0}", adCur.CurrencyCode);
                    Console.WriteLine("CurrencyRoleTypeCode: {0}", adCur.CurrencyRoleTypeCode);
                    Console.WriteLine("WeightCharge: {0}", adCur.WeightCharge);
                    Console.WriteLine("TotalAmount: {0}", adCur.TotalAmount);
                    Console.WriteLine("TotalTaxAmount: {0}", adCur.TotalTaxAmount);
                    Console.WriteLine("WeightChargeTax: {0}", adCur.WeightChargeTax);

                    Console.WriteLine("WeightChargeTaxDet:\n");
                    Console.WriteLine("TaxTypeRate: {0}", adCur.WeightChargeTaxDet.TaxTypeRate);
                    Console.WriteLine("TaxTypeCode: {0}", adCur.WeightChargeTaxDet.TaxTypeCode);
                    Console.WriteLine("WeightChargeTax: {0}", adCur.WeightChargeTaxDet.WeightChargeTax);
                    Console.WriteLine("BaseAmt: {0}", adCur.WeightChargeTaxDet.BaseAmt);


                    Console.WriteLine("-----------------");
                }
                Console.WriteLine("WeightChargeTaxDet:\n");
                Console.WriteLine("TaxTypeRate: {0}", qtdShp.WeightChargeTaxDet.TaxTypeRate);
                Console.WriteLine("TaxTypeCode: {0}", qtdShp.WeightChargeTaxDet.TaxTypeCode);
                Console.WriteLine("WeightChargeTax: {0}", qtdShp.WeightChargeTaxDet.WeightChargeTax);
                Console.WriteLine("BaseAmt: {0}", qtdShp.WeightChargeTaxDet.BaseAmt);


                Console.WriteLine("-----------------");
            }

            Console.WriteLine("Srvs:\n");
            foreach (var srv in info.Srvs)
            {
                Console.WriteLine("Srv:\n");
                Console.WriteLine("GlobalProductCode: {0}", srv.GlobalProductCode);
                foreach (var mrkSrv in srv.MrkSrvs)
                {
                    Console.WriteLine("MrkSrv:\n");
                    if (mrkSrv.LocalProductCode != null)
                    {
                        Console.WriteLine("LocalProductCode: {0}", mrkSrv.LocalProductCode);
                    }


                    if (mrkSrv.ProductShortName != null)
                    {
                        Console.WriteLine("ProductShortName: {0}", mrkSrv.ProductShortName);
                    }


                    if (mrkSrv.LocalProductName != null)
                    {
                        Console.WriteLine("LocalProductName: {0}", mrkSrv.LocalProductName);
                    }


                    if (mrkSrv.NetworkTypeCode != null)
                    {
                        Console.WriteLine("NetworkTypeCode: {0}", mrkSrv.NetworkTypeCode);
                    }


                    if (mrkSrv.POfferedCustAgreement != null)
                    {
                        Console.WriteLine("POfferedCustAgreement: {0}", mrkSrv.POfferedCustAgreement);
                    }

                    if (mrkSrv.TransInd != null)
                    {
                        Console.WriteLine("TransInd: {0}", mrkSrv.TransInd);
                    }


                    if (mrkSrv.LocalServiceType != null)
                    {
                        Console.WriteLine("LocalServiceType: {0}", mrkSrv.LocalServiceType);
                    }


                    if (mrkSrv.GlobalServiceName != null)
                    {
                        Console.WriteLine("GlobalServiceName: {0}", mrkSrv.GlobalServiceName);
                    }

                    if (mrkSrv.LocalServiceTypeName != null)
                    {
                        Console.WriteLine("LocalServiceTypeName: {0}", mrkSrv.LocalServiceTypeName);
                    }

                    if (mrkSrv.ChargeCodeType != null)
                    {
                        Console.WriteLine("ChargeCodeType: {0}", mrkSrv.ChargeCodeType);
                    }

                    if (mrkSrv.MrkSrvInd != null)
                    {
                        Console.WriteLine("MrkSrvInd: {0}", mrkSrv.MrkSrvInd);
                    }

                    Console.WriteLine("-----------------");
                }
            }
        }