Exemplo n.º 1
0
        public void HandleEvent(CreateInvoiceSSBMessage eventMessage)
        {
            string body = String.Format(@"
<Root xmlns=""http://ShippingMessageProcessSchemas.WMSShippingSchema"">
    <toService>http://soa.newegg.com/SOA/CN/InfrastructureService/V10/Warehouse01/ShippingSyncSNService</toService>
    <Node>
        <MessageHead>
            <Action>InvoiceLog</Action>
            <Comment>No Comment</Comment>
            <Sender />
            <Language>CN</Language>
            <Namespace />
            <CompanyCode>{0}</CompanyCode>
        </MessageHead>
        <Body>
            <DropShipMaster ReferenceSONumber=""{1}"" ShippingDateTime=""{2}"" InvoiceNumber=""{3}"">
              <DropShipTransaction  WarehouseNumber=""{4}"">
                <DropShipSerialnumber/>
              </DropShipTransaction>
            </DropShipMaster>
            <ShippingCarrier/>
        </Body>
    </Node>
</Root>", eventMessage.CompanyCode, eventMessage.SOSysNo, DateTime.Now, eventMessage.InvoiceNo, eventMessage.StockSysNo);

            SSBSender.SendV2(ConstValue.SSB_From_Warehouse51FromService, ConstValue.SSB_To_PubSubServic, "Shipping", body, ConstValue.DataBaseName_SSB);
        }
Exemplo n.º 2
0
        public void HandleEvent(WMSSOActionRequestMessage eventMessage)
        {
            if (eventMessage == null)
            {
                throw new ArgumentNullException("eventMessage");
            }

            XElement xmlHead = new XElement("MessageHead"
                                            , new XElement("Namespace", "CN.OrderManagement.OPC.ActionRequest.Create.V1.Publish")
                                            , new XElement("Version", "V3.1")
                                            , new XElement("Action", GetAction(eventMessage.ActionType))
                                            , new XElement("Type", null)
                                            , new XElement("Sender", "Oversea MessageAgent")
                                            , new XElement("Language", eventMessage.Language)
                                            , new XElement("FromSystem", "Oversea")
                                            , new XElement("ToSystem", "WMS")
                                            , new XElement("GlobalBusinessType", "Listing")
                                            , new XElement("TransactionCode", eventMessage.TransactionSysNo));
            XElement xmlBody = new XElement("Body"
                                            , new XElement("SONumber", eventMessage.SOSysNo)
                                            , new XElement("WarehouseNumber", eventMessage.StockSysNo)
                                            , new XElement("CompanyCode", eventMessage.CompanyCode)
                                            , new XElement("ActionUser", eventMessage.ActionUser)
                                            , new XElement("ActionDate", eventMessage.ActionDate)
                                            , new XElement("ActionReason", eventMessage.ActionReason));

            SSBSender.SendV2(ConstValue.SSB_From_OverseaIPPWMSOffline, ConstValue.SSB_To_PubSubServic, String.Format("DC01OverseaIPPWMSOffline_{0}", eventMessage.StockID),
                             xmlHead.ToString() + xmlBody.ToString(), ConstValue.DataBaseName_SSB);

            //Logger.CreateLog(message.Message, MessageDirection.Out, MessageDestination.External, request.Body.SONumber.ToString(), MessageType.SO);
        }
Exemplo n.º 3
0
        public void HandleEvent(ImportVATSSBMessage eventMessage)
        {
            string body = String.Format(@"
<MessageHead>
    <Type>ImportInvoice</Type>
    <Comment>Send so message to local warehouse.</Comment>
</MessageHead>
<Body>
    <InvoiceNodes>
        <InvoiceNode>
            <OrderSysNo>{0}</OrderSysNo>
            <OrderType>{1}</OrderType>
            <WarehouseNumber>{2}</WarehouseNumber>
            <ComputerNo>0</ComputerNo>
        </InvoiceNode>
    </InvoiceNodes> 
</Body>", eventMessage.SOSysNo, eventMessage.OrderType.ToString(), eventMessage.StockSysNo);

            SSBSender.SendV2(ConstValue.SSB_From_WMSShippingProcessDownLoad, ConstValue.SSB_To_PubSubServic, "DC01WMSShippingProcessDownLoad_51", body, ConstValue.DataBaseName_SSB);
        }