Esempio n. 1
0
 public TestApplication()
 {
     Name = "MyTestApplication";
     ReferencedApplications.Add(new TestReferencedApplication());
     ReceivePorts.Add(new TestReceivePort());
     SendPorts.Add(new TestSendPort());
 }
Esempio n. 2
0
 protected override void ApplyEnvironmentOverrides(string environment)
 {
     if (environment.IsDevelopmentOrBuild())
     {
         ReceivePorts.Add(new OneWayReceivePortStub());
         SendPorts.Add(new TwoWaySoapSendPortStub());
     }
 }
 public TestApplication()
 {
     Name        = nameof(TestApplication);
     Description = "Some Useless Test Application";
     ReferencedApplications.Add(new TestReferencedApplication());
     ReceivePorts.Add(new OneWayReceivePort(), new TwoWayReceivePort());
     SendPorts.Add(new OneWaySendPort(), new TwoWaySendPort());
 }
 protected override void ApplyEnvironmentOverrides(string environment)
 {
     if (environment.IsDevelopmentOrBuild())
     {
         ReceivePorts.Add(new PartReceivePortStub());
         SendPorts.Add(new ContentSendPortStub());
     }
 }
Esempio n. 5
0
 public ApplicationBinding()
 {
     Name        = ApplicationName.Is("BizTalk.Factory.Activity.Tracking");
     Description = "BizTalk.Factory's activity model and tracking API for general purpose BizTalk Server development.";
     ReceivePorts.Add(new ClaimReceivePort());
     SendPorts.Add(
         new ClaimCheckInSendPort(),
         new FailedMessageSinkPort());
 }
 public ApplicationBinding()
 {
     Name        = ApplicationName.Is("BizTalk.Factory.Batching");
     Description = "BizTalk.Factory's BizTalk Server Batching Application.";
     ReceivePorts.Add(new ContentReceivePort());
     SendPorts.Add(
         new PartSendPort(),
         new ReleaseSendPort());
 }
 public SampleApplication()
 {
     Name = ApplicationName.Is("Simple.SampleApplication");
     SendPorts.Add(UnitTestSendPort);
     SendPorts.Add(new StandaloneSendPort());
     ReceivePorts.Add(BatchReceivePort);
     ReceivePorts.Add(new StandaloneReceivePort());
     Timestamp = XmlConvert.ToDateTime("2015-02-17T22:51:04+01:00", XmlDateTimeSerializationMode.Local);
 }
 protected override void ApplyEnvironmentOverrides(string environment)
 {
     if (environment.IsDevelopment())
     {
         ReceivePorts.Add(
             new UnitTestReceivePort());
         SendPorts.Add(
             new UnitTestBatchReleaseSendPort(),
             new UnitTestClaimRedeemSendPort(),
             new UnitTestStubSendPort());
     }
 }
 public BizTalkFactoryApplicationBinding()
 {
     Name        = ApplicationName.Is(BizTalkFactorySettings.APPLICATION_NAME);
     Description = "Library to speed up the development of BizTalk Server applications.";
     ReceivePorts.Add(
         new BatchReceivePort(),
         new ClaimReceivePort());
     SendPorts.Add(
         new BatchAddPartSendPort(),
         new BatchQueueControlledReleaseSendPort(),
         new ClaimCheckInSendPort(),
         new SinkFailedMessageSendPort());
 }
Esempio n. 10
0
 protected override void ApplyEnvironmentOverrides(string environment)
 {
     base.ApplyEnvironmentOverrides(environment);
     Orchestrations.Add(
         new Orchestrations.Direct.ProcessOrchestrationBinding(
             o => { o.Host = CommonSettings.ReceiveHost; }),
         new Orchestrations.Dummy.ProcessOrchestrationBinding(
             o => {
         o.ReceivePort         = ReceivePorts.Find <BatchReceivePort>();
         o.RequestResponsePort = _twoWayReceivePort;
         o.SendPort            = SendPorts.Find <BatchAddPartSendPort>();
         o.SolicitResponsePort = _twoWaySendPort;
         o.Host  = CommonSettings.ReceiveHost;
         o.State = ServiceState.Unenlisted;
     }));
 }
        public async Task OnGet()
        {
            HttpClient adminApiClient = _api.InitBiztalkAdminAPI();
            HttpClient adminSrvClient = _api.InitBiztalkMgmtSrv();

            HttpResponseMessage resRL = await adminApiClient.GetAsync("ReceiveLocation");

            if (resRL.IsSuccessStatusCode)
            {
                var resultRL = resRL.Content.ReadAsStringAsync().Result;
                ReceiveLocations2 = JsonConvert.DeserializeObject <IEnumerable <ReceiveLocation2> >(resultRL);
            }
            HttpResponseMessage resSP = await adminApiClient.GetAsync("SendPort");

            if (resSP.IsSuccessStatusCode)
            {
                var resultSP = resSP.Content.ReadAsStringAsync().Result;
                SendPorts = JsonConvert.DeserializeObject <IEnumerable <SendPort> >(resultSP);
            }
            HttpResponseMessage resOrc = await adminApiClient.GetAsync("Orchestration");

            if (resOrc.IsSuccessStatusCode)
            {
                var resultOrc = resOrc.Content.ReadAsStringAsync().Result;
                Orchestrations = JsonConvert.DeserializeObject <IEnumerable <Orchestration> >(resultOrc);
            }
            HttpResponseMessage resApp = await adminSrvClient.GetAsync("Applications");

            if (resApp.IsSuccessStatusCode)
            {
                var resultApp = resApp.Content.ReadAsStringAsync().Result;
                Applications = JsonConvert.DeserializeObject <IEnumerable <Application> >(resultApp);
                AppTree      = new List <ApplicationTree>();
                foreach (Application app in Applications)
                {
                    AppTree.Add(new ApplicationTree
                    {
                        applicationName  = app.Name,
                        orchestrations   = Orchestrations.Where(o => o.applicationName == app.Name).ToList(),
                        receiveLocations = ReceiveLocations2.Where(o => o.applicationName == app.Name).ToList(),
                        sendPorts        = SendPorts.Where(o => o.applicationName == app.Name).ToList()
                    });
                }
            }
        }
Esempio n. 12
0
 public BizTalkFactoryTestArtifactsBinding()
 {
     SendPorts.Add(
         _twoWaySendPort = SendPort(
             sp => {
         sp.Name              = SendPortName.Towards("TestArtifacts").About("Dummy").FormattedAs.None;
         sp.ReceivePipeline   = new ReceivePipeline <PassThruReceive>();
         sp.SendPipeline      = new SendPipeline <PassThruTransmit>();
         sp.State             = ServiceState.Unenlisted;
         sp.Transport.Adapter = new WcfSqlAdapter.Outbound(
             a => {
             a.Address = new SqlAdapterConnectionUri {
                 InitialCatalog = "BizTalkFactoryTransientStateDb",
                 Server         = CommonSettings.ProcessingDatabaseHostName,
                 InstanceName   = CommonSettings.ProcessingDatabaseInstanceName
             };
             a.StaticAction = "TypedProcedure/dbo/usp_batch_AddPart";
         });
         sp.Transport.Host = CommonSettings.TransmitHost;
     }),
         SendPort(
             sp => {
         sp.Name              = SendPortName.Towards("Service").About("Dummy").FormattedAs.None;
         sp.ReceivePipeline   = new ReceivePipeline <PassThruReceive>();
         sp.SendPipeline      = new SendPipeline <PassThruTransmit>();
         sp.Transport.Adapter = new WcfCustomAdapter.Outbound <BasicHttpBindingElement>(
             a => {
             a.Address = new EndpointAddress("https://services.stateless.be/soap/default");
             a.Binding.Security.Mode = BasicHttpSecurityMode.Transport;
             a.Binding.Security.Transport.ClientCredentialType = HttpClientCredentialType.Certificate;
             a.EndpointBehaviors = new[] {
                 new ClientCredentialsElement {
                     ClientCertificate =
                     {
                         FindValue     = "*.stateless.be",
                         StoreLocation = StoreLocation.LocalMachine,
                         StoreName     = StoreName.My,
                         X509FindType  = X509FindType.FindBySubjectName
                     }
                 }
             };
             a.Identity = EndpointIdentityFactory.CreateCertificateIdentity(
                 StoreLocation.LocalMachine,
                 StoreName.TrustedPeople,
                 X509FindType.FindBySubjectDistinguishedName,
                 "*.services.party.be");
         });
         sp.Transport.Host = CommonSettings.TransmitHost;
     }));
     ReceivePorts.Add(
         _twoWayReceivePort = ReceivePort(
             rp => {
         rp.Name = ReceivePortName.Offwards("TestArtifacts");
         rp.ReceiveLocations.Add(
             ReceiveLocation(
                 rl => {
             rl.Name              = ReceiveLocationName.About("Dummy").FormattedAs.None;
             rl.Enabled           = false;
             rl.ReceivePipeline   = new ReceivePipeline <PassThruReceive>();
             rl.SendPipeline      = new SendPipeline <PassThruTransmit>();
             rl.Transport.Adapter = new WcfNetTcpAdapter.Inbound(a => { a.Address = new EndpointAddress("net.tcp://localhost/dummy.svc"); });
             rl.Transport.Host    = CommonSettings.ReceiveHost;
         }));
     }));
 }
Esempio n. 13
0
 public SampleApplicationBinding()
 {
     Name = "BizTalk.Factory";
     SendPorts.Add(TestSendPort);
     ReceivePorts.Add(TestReceivePort);
 }
 public BankingSampleApplication()
 {
     ReceivePorts.Add(new Invoice.TaxAgencyReceivePort());
     SendPorts.Add(new Invoice.BankSendPort());
 }
 ISupportNameResolution IApplicationBindingArtifactLookup.SendPort <T>()
 {
     return(SendPorts.OfType <T>().Single());
 }
Esempio n. 16
0
 public SampleApplicationWithArea()
 {
     ReceivePorts.Add(new Invoice.TaxAgencyReceivePort());
     SendPorts.Add(new Invoice.BankSendPort());
 }
Esempio n. 17
0
 public SampleApplication()
 {
     Name = ApplicationName.Is("Detailed.SampleApplication");
     ReceivePorts.Add(
         CustomerOneWayReceivePort = ReceivePort(
             p => {
         p.Name = ReceivePortName.Offwards(Party.Customer);
         p.ReceiveLocations
         .Add(
             ReceiveLocation(
                 l => {
             l.Name              = ReceiveLocationName.About(MessageName.Invoice).FormattedAs.Xml;
             l.Enabled           = false;
             l.ReceivePipeline   = new ReceivePipeline <XmlReceive>();
             l.Transport.Adapter = new FileAdapter.Inbound(a => { a.ReceiveFolder = @"c:\files\drops"; });
             l.Transport.Host    = Host.RECEIVING_HOST;
         }),
             ReceiveLocation(
                 l => {
             l.Name              = ReceiveLocationName.About(MessageName.CreditNote).FormattedAs.Edi;
             l.Enabled           = false;
             l.ReceivePipeline   = new ReceivePipeline <XmlReceive>();
             l.Transport.Adapter = new FileAdapter.Inbound(a => { a.ReceiveFolder = @"c:\files\drops"; });
             l.Transport.Host    = Host.RECEIVING_HOST;
         })
             );
     }),
         CustomerTwoWayReceivePort = ReceivePort(
             p => {
         p.Name        = ReceivePortName.Offwards(Party.Customer);
         p.Description = "Receives ledgers from customers";
         p.ReceiveLocations.Add(
             ReceiveLocation(
                 l => {
             l.Name              = ReceiveLocationName.About(MessageName.Statement).FormattedAs.Csv;
             l.Enabled           = true;
             l.ReceivePipeline   = new ReceivePipeline <PassThruReceive>(pl => { pl.Decoder <FailedMessageRoutingEnablerComponent>(c => { c.Enabled = false; }); });
             l.SendPipeline      = new SendPipeline <PassThruTransmit>(pl => { pl.PreAssembler <FailedMessageRoutingEnablerComponent>(c => { c.Enabled = false; }); });
             l.Transport.Adapter = new FileAdapter.Inbound(a => { a.ReceiveFolder = @"c:\files\drops"; });
             l.Transport.Host    = Host.RECEIVING_HOST;
         }));
     }),
         ReceivePort(
             p => {
         p.Name        = ReceivePortName.Offwards(Party.Bank);
         p.Description = "Receives financial movements from bank";
         p.ReceiveLocations.Add(
             ReceiveLocation(
                 l => {
             l.Name            = ReceiveLocationName.About(MessageName.Statement).FormattedAs.Xml;
             l.Enabled         = true;
             l.ReceivePipeline = new ReceivePipeline <MicroPipelines.XmlReceive>(
                 pl => {
                 pl.Decoder <MicroPipelineComponent>(
                     c => {
                     c.Enabled    = false;
                     c.Components = new IMicroPipelineComponent[] {
                         new FailedMessageRoutingEnabler {
                             EnableFailedMessageRouting = true, SuppressRoutingFailureReport = false
                         },
                         new ActivityTracker {
                             TrackingModes = ActivityTrackingModes.Claim, TrackingContextCacheDuration = TimeSpan.FromSeconds(120)
                         }
                     };
                 });
             });
             l.Transport.Adapter = new WcfSqlAdapter.Inbound(
                 a => {
                 a.Address = new SqlAdapterConnectionUri {
                     InboundId = "FinancialMovements", InitialCatalog = "BankDb", Server = "localhost"
                 };
                 a.InboundOperationType         = InboundOperation.XmlPolling;
                 a.PolledDataAvailableStatement = "select count(1) from data";
                 a.PollingStatement             = "select * from data for XML";
                 a.PollingInterval    = TimeSpan.FromHours(2);
                 a.PollWhileDataFound = true;
             });
             l.Transport.Host = Host.RECEIVING_HOST;
         }));
     }),
         TaxAgencyOneWayReceivePort = new TaxAgencyReceivePort());
     SendPorts.Add(
         BankOneWaySendPort     = new BankSendPort(),
         CustomerTwoWaySendPort = SendPort(
             p => {
         p.Name                  = SendPortName.Towards(Party.Customer).About(MessageName.Statement).FormattedAs.Csv;
         p.SendPipeline          = new SendPipeline <PassThruTransmit>(pl => { pl.PreAssembler <FailedMessageRoutingEnablerComponent>(c => { c.Enabled = false; }); });
         p.ReceivePipeline       = new ReceivePipeline <PassThruReceive>(pl => { pl.Decoder <FailedMessageRoutingEnablerComponent>(c => { c.Enabled = false; }); });
         p.Transport.Adapter     = new FileAdapter.Outbound(a => { a.DestinationFolder = @"c:\files\drops"; });
         p.Transport.RetryPolicy = RetryPolicy.LongRunning;
         p.Transport.Host        = Host.SENDING_HOST;
     }));
     Orchestrations.Add(
         new ProcessOrchestrationBinding(
             o => {
         o.ReceivePort         = CustomerOneWayReceivePort;
         o.RequestResponsePort = CustomerTwoWayReceivePort;
         o.SendPort            = BankOneWaySendPort;
         o.SolicitResponsePort = CustomerTwoWaySendPort;
         o.Host = Host.PROCESSING_HOST;
     }));
 }
 public FinanceSampleApplication()
 {
     ReceivePorts.Add(new Invoice.TaxAgencyReceivePort());
     SendPorts.Add(new BankSendPort());
     Timestamp = XmlConvert.ToDateTime("2015-02-17T22:51:04+01:00", XmlDateTimeSerializationMode.Local);
 }