Click here to Skip to main content
15,881,757 members
Articles / Web Development / IIS

How to Configure Web Service Calls from Client Applications at Runtime

Rate me:
Please Sign up or sign in to vote.
3.27/5 (22 votes)
6 Jun 20054 min read 189.9K   1.2K   45  
A simple and easy-to-understand project on how to configure Web Service calls from client applications at runtime.
//------------------------------------------------------------------------------
// <autogenerated>
//     This code was generated by a tool.
//     Runtime Version: 1.1.4322.573
//
//     Changes to this file may cause incorrect behavior and will be lost if 
//     the code is regenerated.
// </autogenerated>
//------------------------------------------------------------------------------

// 
// This source code was auto-generated by Microsoft.VSDesigner, Version 1.1.4322.573.
// 
namespace HWApp.AnotherWorld {
    using System.Diagnostics;
    using System.Xml.Serialization;
    using System;
    using System.Web.Services.Protocols;
    using System.ComponentModel;
    using System.Web.Services;
    
    
    /// <remarks/>
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    [System.Web.Services.WebServiceBindingAttribute(Name="AnotherServiceSoap", Namespace="http://tempuri.org/")]
    public class AnotherService : System.Web.Services.Protocols.SoapHttpClientProtocol {
        
        /// <remarks/>
        public AnotherService() {
            this.Url = "http://localhost/HWWebService/AnotherService.asmx";
        }
        
        /// <remarks/>
        [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/AnotherHelloWorld", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
        public string AnotherHelloWorld() {
            object[] results = this.Invoke("AnotherHelloWorld", new object[0]);
            return ((string)(results[0]));
        }
        
        /// <remarks/>
        public System.IAsyncResult BeginAnotherHelloWorld(System.AsyncCallback callback, object asyncState) {
            return this.BeginInvoke("AnotherHelloWorld", new object[0], callback, asyncState);
        }
        
        /// <remarks/>
        public string EndAnotherHelloWorld(System.IAsyncResult asyncResult) {
            object[] results = this.EndInvoke(asyncResult);
            return ((string)(results[0]));
        }
    }
}

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 has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


Written By
Web Developer
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