- virtualserviceforesb_src.zip
- VirtualService
- ESB
- Contracts
- Core
- Extensions
- NullChannelLib
- NullChannelLib.dll
- Hosting
- VirtualServiceHost
- Mediators
- MediatorActivityLibrary
- WS
- WSEventing
- WSEventingActivity
- WSTransfer
- WSTransferActivity
- license.rtf
- Logs
- Test
- Client
- Host
- Logger
- Tester
- VirtualService
- App_Code
- App_Data
- Bin
- ESB.Contracts.dll
- ESB.Core.dll
- ESB.MediatorActivityLibrary.dll
- Logger.dll
- NullChannelLib.dll
- WorkflowLibrary1.dll
- WSTransfer.dll
- WSTransferActivity.dll
- Service1.svc
- Service12.svc
- Service123.svc
- Web.config
- WorkflowLibrary1
- VirtualService.sln
|
//*****************************************************************************
// Description.....WS-Transfer Activity
//
// Author..........Roman Kiss, rkiss@pathcom.com
// Copyright © 2007 ATZ Consulting Inc. (see included license.rtf file)
//
// Date Created: 07/12/07
//
// Date Modified By Description
//-----------------------------------------------------------------------------
// 07/12/07 Roman Kiss Initial Revision
//*****************************************************************************
//
#region Namespaces
using System;
using System.ComponentModel;
using System.ComponentModel.Design;
using System.Collections.Generic;
using System.Collections;
using System.Drawing;
using System.Drawing.Design;
using System.Drawing.Drawing2D;
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;
using System.ServiceModel;
using System.ServiceModel.Description;
using System.ServiceModel.Channels;
//
using RKiss.ESB;
using RKiss.WSTransfer;
#endregion
namespace RKiss.WSTransferActivity
{
[ToolboxItem(typeof(ActivityToolboxItem))]
[Designer(typeof(WSRTActivityDesigner), typeof(IDesigner))]
public partial class WSRT_Mex : Activity
{
public WSRT_Mex()
{
InitializeComponent();
}
protected override void InitializeProperties()
{
base.InitializeProperties();
}
protected override ActivityExecutionStatus Execute(ActivityExecutionContext executionContext)
{
// intercept before the processing
base.RaiseEvent(WSRT_Mex.InvokingEvent, this, EventArgs.Empty);
if (string.IsNullOrEmpty(Wsdl))
{
if (OperationContext.Current != null)
{
ServiceConfigDataService service = OperationContext.Current.Host.Extensions.Find<ServiceConfigDataService>();
Wsdl = service.ServiceConfigData.Wsdl;
}
else
{
throw new InvalidOperationException(string.Format("The {0} activity must run within the ReceiveActivity - valid OperationContext.Current", this.Name));
}
if (string.IsNullOrEmpty(Wsdl))
{
throw new ArgumentException("Missing wsdl metadata in the config");
}
}
System.Xml.XmlDocument doc = new System.Xml.XmlDocument();
if (Wsdl.Trim().StartsWith("<"))
doc.LoadXml(Wsdl);
else
doc.Load(Wsdl);
GetResponse response = new GetResponse(false);
response.Resource = doc.DocumentElement;
MessageResponse = response.CreateMessage();
// done
return ActivityExecutionStatus.Closed;
}
#region Properties
public static DependencyProperty MessageRequestProperty = DependencyProperty.Register("MessageRequest", typeof(Message), typeof(WSRT_Mex));
[DescriptionAttribute("UnTyped Message Request")]
[CategoryAttribute("Message")]
[BrowsableAttribute(true)]
[DesignerSerializationVisibilityAttribute(DesignerSerializationVisibility.Visible)]
public Message MessageRequest
{
get
{
return ((Message)(base.GetValue(WSRT_Mex.MessageRequestProperty)));
}
set
{
base.SetValue(WSRT_Mex.MessageRequestProperty, value);
}
}
public static DependencyProperty MessageResponseProperty = DependencyProperty.Register("MessageResponse", typeof(Message), typeof(WSRT_Mex));
[DescriptionAttribute("UnTyped Message Response")]
[CategoryAttribute("Message")]
[BrowsableAttribute(true)]
[DesignerSerializationVisibilityAttribute(DesignerSerializationVisibility.Visible)]
public Message MessageResponse
{
get
{
return ((Message)(base.GetValue(WSRT_Mex.MessageResponseProperty)));
}
set
{
base.SetValue(WSRT_Mex.MessageResponseProperty, value);
}
}
public string Wsdl { get; set; }
#endregion
#region Handlers
public static DependencyProperty InvokingEvent = DependencyProperty.Register("Invoking", typeof(EventHandler), typeof(WSRT_Mex));
[Description("Please specify the method to be called before the activity is executed")]
[Category("Handlers")]
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Visible)]
public event EventHandler Invoking
{
add
{
base.AddHandler(WSRT_Mex.InvokingEvent, value);
}
remove
{
base.RemoveHandler(WSRT_Mex.InvokingEvent, value);
}
}
#endregion
}
}
|
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.
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.