예제 #1
0
        public static ConfirmOrderResponse Unmarshall(UnmarshallerContext context)
        {
            ConfirmOrderResponse confirmOrderResponse = new ConfirmOrderResponse();

            confirmOrderResponse.HttpResponse = context.HttpResponse;
            confirmOrderResponse.RequestId    = context.StringValue("ConfirmOrder.RequestId");
            confirmOrderResponse.Success      = context.BooleanValue("ConfirmOrder.Success");

            return(confirmOrderResponse);
        }
예제 #2
0
        public void Confirm_AbortOrPostalizza()
        {
            string guidMessage = "5447fb1c-77d5-4c92-8eb0-97e0bbb8db66";

            string xmlConfirmMessage = @"<ns0:ConfirmService GUIDMessage='%GUID%' IdOrdine='171C371E-B00A-4737-9B38-0524DCD7777E' PaymentTypeId='6' xmlns:ns0='http://posteitaliane.it/ordermanagement/schemas' />";

            xmlConfirmMessage = xmlConfirmMessage.Replace("%GUID%", guidMessage);
            var ceHeader = Helper.GetCeHeader();

            ceHeader.SenderSystem = "H2H";
            ceHeader.IDSender     = "999988";
            ceHeader.IdCRM        = string.Empty;
            ceHeader.UserId       = "nello.citta.npce";
            ceHeader.ContractId   = string.Empty;
            ceHeader.GUIDMessage  = guidMessage;
            ConfirmOrderResponse confirmResponse = null;
            ConfirmOrder         confirmRequest  = null;

            confirmRequest = ComunicazioniElettroniche.Common.Serialization.SerializationUtility.Deserialize <ConfirmOrder>(xmlConfirmMessage);

            var result = Helper.PublishToBizTalk <ConfirmOrder, ConfirmOrderResponse>(confirmRequest, ceHeader, ambiente.UrlEntryPoint, out confirmResponse);

            Assert.AreEqual(TResultResType.I, result.ResType);
        }
예제 #3
0
        public NegotiatedContentResult <ConfirmOrderResponse> PostConfirmOrder([FromBody] ConfirmOrderRequest request)
        {
            ConfirmOrderResponse resp = _ordersServices.ConfirmOrder(request);

            return(Content(HttpStatusCode.OK, resp));
        }