Click here to Skip to main content
12,354,804 members (61,885 online)
Click here to Skip to main content


174 bookmarked

ASP.NET Web Service

, 7 Jul 2001 CPOL
Tutorial on Creating ASP.NET Web Service
// <autogenerated>
//     This code was generated by a tool.
//     Runtime Version: 1.0.2914.16
//     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 wsdl, Version=1.0.2914.16.
using System.Diagnostics;
using System.Xml.Serialization;
using System;
using System.Web.Services.Protocols;
using System.Web.Services;

[System.Web.Services.WebServiceBindingAttribute(Name="MyClassSoap", Namespace="")]
public class MyClass : System.Web.Services.Protocols.SoapHttpClientProtocol {
    public MyClass() {
        this.Url = "http://localhost/ASP.NET/MyWebService.asmx";
    [System.Web.Services.Protocols.SoapDocumentMethodAttribute("", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
    public int Add(int a, int b) {
        object[] results = this.Invoke("Add", new object[] {
        return ((int)(results[0]));
    public System.IAsyncResult BeginAdd(int a, int b, System.AsyncCallback callback, object asyncState) {
        return this.BeginInvoke("Add", new object[] {
                    b}, callback, asyncState);
    public int EndAdd(System.IAsyncResult asyncResult) {
        object[] results = this.EndInvoke(asyncResult);
        return ((int)(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.


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author

Hong Kong Hong Kong
I am always interested in finding innovative ways for building better applications and founded a technology company since 2003. Welcome to exchange any idea with you and if I am not too busy before deadline of projects, I will reply your emails. Also, if you willing to pay for consulting works and customized software development, you can leave me message.

You may also be interested in...

| Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.160621.1 | Last Updated 8 Jul 2001
Article Copyright 2001 by matthew_from_hk
Everything else Copyright © CodeProject, 1999-2016
Layout: fixed | fluid