Click here to Skip to main content
15,891,895 members
Articles / Programming Languages / C#

Migrating ASMX Services to WCF Services

Rate me:
Please Sign up or sign in to vote.
4.67/5 (7 votes)
17 Jan 2012CPOL5 min read 59.4K   1.4K   39  
Creating a WCF Service to replace existing ASMX Services.
//------------------------------------------------------------------------------
// <auto-generated>
//     This code was generated by a tool.
//     Runtime Version:4.0.30319.239
//
//     Changes to this file may cause incorrect behavior and will be lost if
//     the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------

namespace ASMX2WCF.Clients.WCFClient.WCFStringServiceReference {
    
    
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
    [System.ServiceModel.ServiceContractAttribute(ConfigurationName="WCFStringServiceReference.StringService")]
    public interface StringService {
        
        [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/StringService/StringConcat", ReplyAction="http://tempuri.org/StringService/StringConcatResponse")]
        string StringConcat(string value1, string value2);
    }
    
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
    public interface StringServiceChannel : ASMX2WCF.Clients.WCFClient.WCFStringServiceReference.StringService, System.ServiceModel.IClientChannel {
    }
    
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
    public partial class StringServiceClient : System.ServiceModel.ClientBase<ASMX2WCF.Clients.WCFClient.WCFStringServiceReference.StringService>, ASMX2WCF.Clients.WCFClient.WCFStringServiceReference.StringService {
        
        public StringServiceClient() {
        }
        
        public StringServiceClient(string endpointConfigurationName) : 
                base(endpointConfigurationName) {
        }
        
        public StringServiceClient(string endpointConfigurationName, string remoteAddress) : 
                base(endpointConfigurationName, remoteAddress) {
        }
        
        public StringServiceClient(string endpointConfigurationName, System.ServiceModel.EndpointAddress remoteAddress) : 
                base(endpointConfigurationName, remoteAddress) {
        }
        
        public StringServiceClient(System.ServiceModel.Channels.Binding binding, System.ServiceModel.EndpointAddress remoteAddress) : 
                base(binding, remoteAddress) {
        }
        
        public string StringConcat(string value1, string value2) {
            return base.Channel.StringConcat(value1, value2);
        }
    }
}

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
Team Leader ALGOSYSTEMS
Greece Greece
I live in Athens Greece and currently I am working with Business scale application with .NET latest technologies

I've been developing applications for personal and friends usage with C++ using majorly Borland's various IDEs since 1994.
In 2002 I began working for an R&D institute where I was introduced to C# which I worships ever since.

I love core application development and I would like to publish more articles here and on my blog, but there is not enough time to do so.

I usualy "waste" my spare time watching sitcoms, preferable SCI-FI.
I would like to play chess but I can't find any real world players to hang out with.

Comments and Discussions