- 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
|
using System;
using System.ComponentModel;
using System.Collections.Generic;
using System.ComponentModel.Design;
using System.Collections;
using System.Drawing;
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.Channels;
using System.Runtime.Serialization;
using System.Xml;
using System.IO;
//
using RKiss.WSTransfer;
namespace WorkflowLibrary1
{
public partial class Workflow5 : SequentialWorkflowActivity
{
public System.ServiceModel.Channels.Message _message = default(System.ServiceModel.Channels.Message);
public System.ServiceModel.Channels.Message _returnValue = default(System.ServiceModel.Channels.Message);
private void InMessage(object sender, EventArgs e)
{
Console.WriteLine("\n **** ProcessMessage - mediation IN ****");
Console.WriteLine("\n" + _message);
}
private void ProcessMessage(object sender, EventArgs e)
{
Console.WriteLine("\n **** Invoking Business ****\n");
}
private void OutMessage(object sender, EventArgs e)
{
Console.WriteLine("\n **** ProcessMessage - mediation OUT ****");
// post-processing
List<AddressHeader> list = new List<AddressHeader>();
list.Add(AddressHeader.CreateAddressHeader(ResourceDescriptor.DataContractName, ResourceDescriptor.DataContractNamespace, new ResourceDescriptor()));
AddressHeaderCollection ahc = new AddressHeaderCollection(new AddressHeaderCollection(list));
Uri uriTo = OperationContext.Current.IncomingMessageHeaders.To;
EndpointAddress resourceEndpointAddress = new EndpointAddress(uriTo, (EndpointIdentity)null, ahc);
// create stream
MemoryStream ms = new MemoryStream();
XmlWriterSettings settings = new XmlWriterSettings();
settings.ConformanceLevel = ConformanceLevel.Fragment;
XmlWriter xw = XmlWriter.Create(ms, settings);
resourceEndpointAddress.WriteTo(AddressingVersion.WSAddressing10, xw, WSTransfer.ElementNames.ResourceCreated, WSTransfer.NamespaceUri);
xw.Flush();
ms.Position = 0;
// create message body from stream
XmlDictionaryReader xdr = XmlDictionaryReader.CreateTextReader(ms, XmlDictionaryReaderQuotas.Max);
_returnValue = Message.CreateMessage(MessageVersion.Default, WSTransfer.CreateResponseAction, xdr);
MessageHeader hdr = MessageHeader.CreateHeader(WSResourceTransfer.ElementNames.ResourceTransfer, WSResourceTransfer.NamespaceUri, null);
_returnValue.Headers.Add(hdr);
}
}
}
|
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.