Beispiel #1
0
 public IntermediaryInboundStreamedFormEC2()
 {
     InitializeComponent();
     IisepFunc = new IntermediaryInboundStreamedEndPointFunctionalityEC2();
     IisepFunc.ReturnMessageXml += ReturnMessageXmlHandler;
     Shipment     = new IntermediaryStreamedSubmitAttachmentShipment();
     TestShipment = new BaseShipment();
     Result       = new IntermediaryStreamedAttachmentResult();
 }
Beispiel #2
0
 public IntermediaryInboundStreamedForm()
 {
     InitializeComponent();
     iisepFunc = new IntermediaryInboundStreamedEndPointFunctionality();
     iisepFunc.ReturnMessageXml += ReturnMessageXmlHandler;
     shipment     = new IntermediaryStreamedSubmitAttachmentShipment();
     testShipment = new Classes.BaseShipment();
     result       = new IntermediaryStreamedAttachmentResult();
 }
        public IntermediaryStreamedAttachmentResult SubmitAttachmentStreamed(IntermediaryStreamedSubmitAttachmentShipment shipment)
        {
            IntermediaryStreamedAttachmentResult result = new IntermediaryStreamedAttachmentResult();
            var client = GenerateProxy(shipment.EndpointName, shipment.Certificate);

            using (FileStream fs = new FileStream(shipment.FilePath, FileMode.Open))
            {
                OperationContext = "IntStreamedSubmitAttachment";
                client.SubmitAttachmentStreamedEC(shipment.AttachmentTypeName, shipment.CheckSum, shipment.EndUserSystemReference, shipment.FileName,
                                                  shipment.Name, shipment.ReporteeElementId, shipment.Password, shipment.Username, fs,
                                                  out result.ParentReceiptId, out result.ReceiptHistory, out result.ReceiptId, out result.ReceiptStatusCode, out result.ReceiptText, out result.ReceiptTypeName);
            }
            return(result);
        }