Click here to Skip to main content
15,886,518 members
Articles / Programming Languages / XML

WS-Transfer Service for Workflow

Rate me:
Please Sign up or sign in to vote.
4.93/5 (16 votes)
23 Nov 2006CPOL12 min read 95.9K   438   62  
This article describes a design and implementation of the WF workflow connectivity to the Windows Communication Foundation (WCF) Service for WS-Transfer operation contract.
//*****************************************************************************
//    Description.....Service Host process
//                                
//    Author..........Roman Kiss, rkiss@pathcom.com
//    Copyright � 2005 ATZ Consulting Inc. (see included license.rtf file)         
//                        
//    Date Created:    05/05/06
//
//    Date        Modified By     Description
//-----------------------------------------------------------------------------
//    05/05/06    Roman Kiss     Initial Revision
//    07/07/06    Roman Kiss     JuneCTP version
//*****************************************************************************
//
#region
using System;
using System.Collections.Generic;
using System.Text;
using System.ServiceModel;
using System.Management;
using RKiss.WSTransfer;
using RKiss.WSTransfer.Services;
//
using RKiss.ServiceHostExtension;
#endregion

namespace ServiceHost
{
    class Program
    {
        static void Main(string[] args)
        {
            try
            {
                using (System.ServiceModel.ServiceHost host = new System.ServiceModel.ServiceHost(typeof(WSTransferService)))
                {
                    // Service extension for WF 
                    WFServiceHostExtension extension = new WFServiceHostExtension("WorkflowRuntimeConfig", "LocalServicesConfig");

                    // Add the Extension to the ServiceHost collection
                    host.Extensions.Add(extension);

                    host.Open();

                    Console.WriteLine("Press any key to stop server...");
                    Console.ReadLine();
                    host.Close();
                }
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex);
                Console.ReadLine();
            }
        }
    }
}

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