Esempio n. 1
0
        private List <Scope> GetBusniessScopes(SbdAddressInfo sbdAddressInfo)
        {
            var scopes = new List <Scope>
            {
                new Scope
                {
                    Type = "ConversationId",
                    InstanceIdentifier = "6d0ec155-b4f7-43c3-908e-211d68c9cf09",
                    Identifier         = sbdAddressInfo.ProcessId,
                    ScopeInformation   = new[]
                    { new CorrelationInformation {
                          ExpectedResponseDateTime = DateTime.Now.AddHours(1)
                      } }
                },
                new Scope
                {
                    Type = "SenderRef",
                    InstanceIdentifier = Guid.NewGuid().ToString(),
                    Identifier         = "AvsenderSystem"
                },
                new Scope
                {
                    Type = "ReceiverRef",
                    InstanceIdentifier = Guid.NewGuid().ToString(),
                    Identifier         = "MottakerSystem"
                }
            };


            return(scopes);
        }
Esempio n. 2
0
 private DocumentIdentification GetDocumentIdentification(SbdAddressInfo sbdAddressInfo)
 {
     return(new DocumentIdentification
     {
         Standard = sbdAddressInfo.DocumenttypeId,
         CreationDateAndTime = DateTime.Now,
         TypeVersion = "2.0",
         InstanceIdentifier = Guid.NewGuid().ToString(),
         Type = sbdAddressInfo.ForettningsmeldingType
     });
 }
Esempio n. 3
0
        private StandardBusinessDocumentHeader GetStandardBusinessDocumentHeader(SbdAddressInfo sbdAddressInfo)
        {
            List <Scope> s     = new List <Scope>();
            var          scope = new Scope();

            s.Add(new Scope());

            var sbdh = new StandardBusinessDocumentHeader
            {
                HeaderVersion          = "1.0",
                Sender                 = new[] { GetPartner(sbdAddressInfo.SenderOrganisationNumber.ToString()) },
                Receiver               = new[] { GetPartner(sbdAddressInfo.ReceiverOrganisationNumber.ToString()) },
                DocumentIdentification = GetDocumentIdentification(sbdAddressInfo),
                BusinessScope          = new BusinessScope {
                    Scope = GetBusniessScopes(sbdAddressInfo)
                }
            };



            return(sbdh);
        }
Esempio n. 4
0
 public StandardBusinessDocument(SbdAddressInfo sbdAddressInfo, BusinessMessageCore businessMessageCore)
 {
     StandardBusinessDocumentHeader = GetStandardBusinessDocumentHeader(sbdAddressInfo);
     Any = SerializeToXmlElement(businessMessageCore);
 }