Click here to Skip to main content
15,892,298 members
Articles / DevOps / Load Testing

VirtualService for ESB

Rate me:
Please Sign up or sign in to vote.
4.90/5 (32 votes)
19 Feb 2008CPOL37 min read 96.9K   1.2K   98  
This article describes the design, implementation, and usage of VirtualService for the Enterprise Service Bus, using the Microsoft .NET FX 3.5 technology.
using System;
using System.ComponentModel;
using System.ComponentModel.Design;
using System.Collections;
using System.Drawing;
using System.Reflection;
using System.Workflow.ComponentModel.Compiler;
using System.Workflow.ComponentModel.Serialization;
using System.Workflow.ComponentModel;
using System.Workflow.ComponentModel.Design;
using System.Workflow.Runtime;
using System.Workflow.Activities;
using System.Workflow.Activities.Rules;
//


namespace WorkflowLibrary1
{
	partial class WS_ResourceTransfer
	{
		#region Designer generated code
		
		/// <summary> 
		/// Required method for Designer support - do not modify 
		/// the contents of this method with the code editor.
		/// </summary>
        [System.Diagnostics.DebuggerNonUserCode]
		private void InitializeComponent()
		{
            this.CanModifyActivities = true;
            System.Workflow.Activities.ChannelToken channeltoken1 = new System.Workflow.Activities.ChannelToken();
            System.Workflow.ComponentModel.WorkflowParameterBinding workflowparameterbinding1 = new System.Workflow.ComponentModel.WorkflowParameterBinding();
            System.Workflow.Activities.TypedOperationInfo typedoperationinfo1 = new System.Workflow.Activities.TypedOperationInfo();
            System.Workflow.ComponentModel.ActivityBind activitybind1 = new System.Workflow.ComponentModel.ActivityBind();
            System.Workflow.ComponentModel.WorkflowParameterBinding workflowparameterbinding2 = new System.Workflow.ComponentModel.WorkflowParameterBinding();
            System.Workflow.ComponentModel.ActivityBind activitybind2 = new System.Workflow.ComponentModel.ActivityBind();
            System.Workflow.ComponentModel.WorkflowParameterBinding workflowparameterbinding3 = new System.Workflow.ComponentModel.WorkflowParameterBinding();
            System.Workflow.Activities.TypedOperationInfo typedoperationinfo2 = new System.Workflow.Activities.TypedOperationInfo();
            System.Workflow.ComponentModel.ActivityBind activitybind3 = new System.Workflow.ComponentModel.ActivityBind();
            System.Workflow.ComponentModel.WorkflowParameterBinding workflowparameterbinding4 = new System.Workflow.ComponentModel.WorkflowParameterBinding();
            System.Workflow.ComponentModel.ActivityBind activitybind4 = new System.Workflow.ComponentModel.ActivityBind();
            System.Workflow.ComponentModel.WorkflowParameterBinding workflowparameterbinding5 = new System.Workflow.ComponentModel.WorkflowParameterBinding();
            System.Workflow.Activities.TypedOperationInfo typedoperationinfo3 = new System.Workflow.Activities.TypedOperationInfo();
            System.Workflow.ComponentModel.ActivityBind activitybind5 = new System.Workflow.ComponentModel.ActivityBind();
            System.Workflow.ComponentModel.WorkflowParameterBinding workflowparameterbinding6 = new System.Workflow.ComponentModel.WorkflowParameterBinding();
            System.Workflow.ComponentModel.ActivityBind activitybind6 = new System.Workflow.ComponentModel.ActivityBind();
            System.Workflow.ComponentModel.WorkflowParameterBinding workflowparameterbinding7 = new System.Workflow.ComponentModel.WorkflowParameterBinding();
            System.Workflow.Activities.TypedOperationInfo typedoperationinfo4 = new System.Workflow.Activities.TypedOperationInfo();
            System.Workflow.ComponentModel.ActivityBind activitybind7 = new System.Workflow.ComponentModel.ActivityBind();
            System.Workflow.ComponentModel.WorkflowParameterBinding workflowparameterbinding8 = new System.Workflow.ComponentModel.WorkflowParameterBinding();
            System.Workflow.ComponentModel.ActivityBind activitybind8 = new System.Workflow.ComponentModel.ActivityBind();
            System.Workflow.ComponentModel.WorkflowParameterBinding workflowparameterbinding9 = new System.Workflow.ComponentModel.WorkflowParameterBinding();
            System.Workflow.Activities.TypedOperationInfo typedoperationinfo5 = new System.Workflow.Activities.TypedOperationInfo();
            System.Workflow.Activities.WorkflowServiceAttributes workflowserviceattributes1 = new System.Workflow.Activities.WorkflowServiceAttributes();
            this.sendActivity1 = new System.Workflow.Activities.SendActivity();
            this.DeleteProcessor = new RKiss.WSTransferActivity.WSRT_Delete();
            this.PutProcessor = new RKiss.WSTransferActivity.WSRT_Put();
            this.GetProcessor = new RKiss.WSTransferActivity.WSRT_Get();
            this.CreateProcessor = new RKiss.WSTransferActivity.WSRT_Create();
            this.Delete = new System.Workflow.Activities.ReceiveActivity();
            this.Put = new System.Workflow.Activities.ReceiveActivity();
            this.Get = new System.Workflow.Activities.ReceiveActivity();
            this.Create = new System.Workflow.Activities.ReceiveActivity();
            this.D = new System.Workflow.Activities.EventDrivenActivity();
            this.U = new System.Workflow.Activities.EventDrivenActivity();
            this.R = new System.Workflow.Activities.EventDrivenActivity();
            this.C = new System.Workflow.Activities.EventDrivenActivity();
            this.WS_Transfer = new System.Workflow.Activities.ListenActivity();
            // 
            // sendActivity1
            // 
            channeltoken1.EndpointName = "dada";
            channeltoken1.Name = "abcd";
            channeltoken1.OwnerActivityName = "C";
            this.sendActivity1.ChannelToken = channeltoken1;
            this.sendActivity1.Name = "sendActivity1";
            workflowparameterbinding1.ParameterName = "value";
            workflowparameterbinding1.Value = 12121212;
            this.sendActivity1.ParameterBindings.Add(workflowparameterbinding1);
            typedoperationinfo1.ContractType = typeof(Contract.ITest3);
            typedoperationinfo1.Name = "Ping2";
            this.sendActivity1.ServiceOperationInfo = typedoperationinfo1;
            this.sendActivity1.AfterResponse += new System.EventHandler<System.Workflow.Activities.SendActivityEventArgs>(this.After);
            this.sendActivity1.BeforeSend += new System.EventHandler<System.Workflow.Activities.SendActivityEventArgs>(this.Before);
            // 
            // DeleteProcessor
            // 
            this.DeleteProcessor.DeleteRequest = null;
            this.DeleteProcessor.DeleteResponse = null;
            this.DeleteProcessor.Name = "DeleteProcessor";
            this.DeleteProcessor.ResourceDescriptor = null;
            // 
            // PutProcessor
            // 
            this.PutProcessor.FragmentsLimit = ((uint)(0u));
            this.PutProcessor.Name = "PutProcessor";
            this.PutProcessor.PutRequest = null;
            this.PutProcessor.PutResponse = null;
            this.PutProcessor.ResourceDescriptor = null;
            this.PutProcessor.SupportedDialects = null;
            this.PutProcessor.SupportedModes = null;
            // 
            // GetProcessor
            // 
            this.GetProcessor.ExpressionsLimit = ((uint)(1u));
            this.GetProcessor.GetRequest = null;
            this.GetProcessor.GetResponse = null;
            this.GetProcessor.Name = "GetProcessor";
            this.GetProcessor.ResourceDescriptor = null;
            this.GetProcessor.Results = null;
            this.GetProcessor.SupportedDialects = null;
            // 
            // CreateProcessor
            // 
            this.CreateProcessor.Activities.Add(this.sendActivity1);
            this.CreateProcessor.CreateRequest = null;
            this.CreateProcessor.CreateResponse = null;
            this.CreateProcessor.Name = "CreateProcessor";
            this.CreateProcessor.ResourceDescriptor = null;
            this.CreateProcessor.ResourceKey = null;
            this.CreateProcessor.ResourceName = "MyResource";
            this.CreateProcessor.ResourceTopic = "Fafa";
            this.CreateProcessor.ResourceUri = null;
            // 
            // Delete
            // 
            this.Delete.Activities.Add(this.DeleteProcessor);
            this.Delete.CanCreateInstance = true;
            this.Delete.Name = "Delete";
            activitybind1.Name = "DeleteProcessor";
            activitybind1.Path = "DeleteResponse";
            workflowparameterbinding2.ParameterName = "(ReturnValue)";
            workflowparameterbinding2.SetBinding(System.Workflow.ComponentModel.WorkflowParameterBinding.ValueProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind1)));
            activitybind2.Name = "DeleteProcessor";
            activitybind2.Path = "DeleteRequest";
            workflowparameterbinding3.ParameterName = "request";
            workflowparameterbinding3.SetBinding(System.Workflow.ComponentModel.WorkflowParameterBinding.ValueProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind2)));
            this.Delete.ParameterBindings.Add(workflowparameterbinding2);
            this.Delete.ParameterBindings.Add(workflowparameterbinding3);
            typedoperationinfo2.ContractType = typeof(RKiss.WSTransfer.IWSTransferOperation);
            typedoperationinfo2.Name = "Delete";
            this.Delete.ServiceOperationInfo = typedoperationinfo2;
            // 
            // Put
            // 
            this.Put.Activities.Add(this.PutProcessor);
            this.Put.CanCreateInstance = true;
            this.Put.Name = "Put";
            activitybind3.Name = "PutProcessor";
            activitybind3.Path = "PutResponse";
            workflowparameterbinding4.ParameterName = "(ReturnValue)";
            workflowparameterbinding4.SetBinding(System.Workflow.ComponentModel.WorkflowParameterBinding.ValueProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind3)));
            activitybind4.Name = "PutProcessor";
            activitybind4.Path = "PutRequest";
            workflowparameterbinding5.ParameterName = "request";
            workflowparameterbinding5.SetBinding(System.Workflow.ComponentModel.WorkflowParameterBinding.ValueProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind4)));
            this.Put.ParameterBindings.Add(workflowparameterbinding4);
            this.Put.ParameterBindings.Add(workflowparameterbinding5);
            typedoperationinfo3.ContractType = typeof(RKiss.WSTransfer.IWSTransferOperation);
            typedoperationinfo3.Name = "Put";
            this.Put.ServiceOperationInfo = typedoperationinfo3;
            // 
            // Get
            // 
            this.Get.Activities.Add(this.GetProcessor);
            this.Get.CanCreateInstance = true;
            this.Get.Name = "Get";
            activitybind5.Name = "GetProcessor";
            activitybind5.Path = "GetResponse";
            workflowparameterbinding6.ParameterName = "(ReturnValue)";
            workflowparameterbinding6.SetBinding(System.Workflow.ComponentModel.WorkflowParameterBinding.ValueProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind5)));
            activitybind6.Name = "GetProcessor";
            activitybind6.Path = "GetRequest";
            workflowparameterbinding7.ParameterName = "request";
            workflowparameterbinding7.SetBinding(System.Workflow.ComponentModel.WorkflowParameterBinding.ValueProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind6)));
            this.Get.ParameterBindings.Add(workflowparameterbinding6);
            this.Get.ParameterBindings.Add(workflowparameterbinding7);
            typedoperationinfo4.ContractType = typeof(RKiss.WSTransfer.IWSTransferOperation);
            typedoperationinfo4.Name = "Get";
            this.Get.ServiceOperationInfo = typedoperationinfo4;
            // 
            // Create
            // 
            this.Create.Activities.Add(this.CreateProcessor);
            this.Create.CanCreateInstance = true;
            this.Create.Name = "Create";
            activitybind7.Name = "CreateProcessor";
            activitybind7.Path = "CreateRequest";
            workflowparameterbinding8.ParameterName = "request";
            workflowparameterbinding8.SetBinding(System.Workflow.ComponentModel.WorkflowParameterBinding.ValueProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind7)));
            activitybind8.Name = "CreateProcessor";
            activitybind8.Path = "CreateResponse";
            workflowparameterbinding9.ParameterName = "(ReturnValue)";
            workflowparameterbinding9.SetBinding(System.Workflow.ComponentModel.WorkflowParameterBinding.ValueProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind8)));
            this.Create.ParameterBindings.Add(workflowparameterbinding8);
            this.Create.ParameterBindings.Add(workflowparameterbinding9);
            typedoperationinfo5.ContractType = typeof(RKiss.WSTransfer.IWSTransfer);
            typedoperationinfo5.Name = "Create";
            this.Create.ServiceOperationInfo = typedoperationinfo5;
            this.Create.OperationValidation += new System.EventHandler<System.Workflow.Activities.OperationValidationEventArgs>(this.validation);
            // 
            // D
            // 
            this.D.Activities.Add(this.Delete);
            this.D.Name = "D";
            // 
            // U
            // 
            this.U.Activities.Add(this.Put);
            this.U.Name = "U";
            // 
            // R
            // 
            this.R.Activities.Add(this.Get);
            this.R.Name = "R";
            // 
            // C
            // 
            this.C.Activities.Add(this.Create);
            this.C.Name = "C";
            // 
            // WS_Transfer
            // 
            this.WS_Transfer.Activities.Add(this.C);
            this.WS_Transfer.Activities.Add(this.R);
            this.WS_Transfer.Activities.Add(this.U);
            this.WS_Transfer.Activities.Add(this.D);
            this.WS_Transfer.Name = "WS_Transfer";
            workflowserviceattributes1.ConfigurationName = "WorkflowLibrary1.WS_ResourceTransfer";
            workflowserviceattributes1.Name = "WS_ResourceTransfer";
            workflowserviceattributes1.UseSynchronizationContext = false;
            workflowserviceattributes1.ValidateMustUnderstand = false;
            // 
            // WS_ResourceTransfer
            // 
            this.Activities.Add(this.WS_Transfer);
            this.Name = "WS_ResourceTransfer";
            this.SetValue(System.Workflow.Activities.ReceiveActivity.WorkflowServiceAttributesProperty, workflowserviceattributes1);
            this.CanModifyActivities = false;

		}

		#endregion

        private RKiss.WSTransferActivity.WSRT_Create CreateProcessor;
        private EventDrivenActivity C;
        private ReceiveActivity Get;
        private ReceiveActivity Create;
        private EventDrivenActivity R;
        private ReceiveActivity Delete;
        private ReceiveActivity Put;
        private EventDrivenActivity D;
        private EventDrivenActivity U;
        private SendActivity sendActivity1;
        private RKiss.WSTransferActivity.WSRT_Put PutProcessor;
        private RKiss.WSTransferActivity.WSRT_Get GetProcessor;
        private RKiss.WSTransferActivity.WSRT_Delete DeleteProcessor;
        private ListenActivity WS_Transfer;











































































    }
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer (Senior)
United States United States
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions