This documentation is archived and is not being maintained.

SoapRpcServiceAttribute Constructor

Initializes a new instance of the SoapRpcServiceAttribute class.

[Visual Basic]
Public Sub New()
public SoapRpcServiceAttribute();
public: SoapRpcServiceAttribute();
public function SoapRpcServiceAttribute();


[Visual Basic] 
<%@ WebService Language="VB" Class="SumService" %>

Imports System
Imports System.Web.Services
Imports System.Web.Services.Protocols
Imports System.Web.Services.Description

    <SoapRpcServiceAttribute(RoutingStyle:=SoapServiceRoutingStyle.SoapAction)> _
    Public Class SumService 
          Inherits System.Web.Services.WebService
        <WebMethod> _
        Public Function Add(a As Integer, b as Integer)
           return a + b
        End Function
    End Class

<%@ WebService Language="c#" Class="SumService" %>

using System;
using System.Web.Services;
using System.Web.Services.Protocols;
using System.Web.Services.Description;

    public class SumService : System.Web.Services.WebService
        public int Add(int a, int b)
            return a + b;

[C++, JScript] No example is available for C++ or JScript. To view a Visual Basic or C# example, click the Language Filter button Language Filter in the upper-left corner of the page.


Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

SoapRpcServiceAttribute Class | SoapRpcServiceAttribute Members | System.Web.Services.Protocols Namespace