Click here to Skip to main content
15,892,059 members
Articles / Web Development / ASP.NET

Invoking a Web Service Without Web Reference

Rate me:
Please Sign up or sign in to vote.
4.53/5 (35 votes)
27 Jun 20068 min read 300.5K   3.7K   81  
How to support loosely coupled integration by invoking Web Services dynamically, without setting a Web Reference.
using System;
using System.Web;
using System.Web.Services;
using System.Web.Services.Protocols;

[WebService(Namespace = "http://tempuri.org/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
public class WelcomeMessageStub : System.Web.Services.WebService
{
    public WelcomeMessageStub () { }
    [WebMethod]
    public string GetWelcomeMessage() {
        return "The Welcome Message That You Need To Return";
    }

}

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
India India
Rajiv has been developing on Microsoft Platforms for over 6 years and is a principal officer, technology @ eFORCE Inc. where he has worked for around 5 years and enjoys doing some really interesting stuff like writing a software adaptor for MFD scanners and other hardware using Microsoft Technologies, Writing a DAL that hooks up VC++ layers to .NET, writing a .NET Remoting Bridge that securely connects world-wide oil rigs of a drilling company and many other interesting endeavours.

More information about Rajiv can be found @ www.rajivpopat.com

Comments and Discussions