SoapRpcServiceAttribute Constructor
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Initializes a new instance of the SoapRpcServiceAttribute class.
public:
SoapRpcServiceAttribute();
public SoapRpcServiceAttribute ();
Public Sub New ()
Examples
The following example shows how to create an instance of the SoapRpcServiceAttribute class.
<%@ WebService Language="c#" Class="SumService" %>
using System;
using System.Web.Services;
using System.Web.Services.Protocols;
using System.Web.Services.Description;
[SoapRpcService(RoutingStyle=SoapServiceRoutingStyle.SoapAction)]
public class SumService : System.Web.Services.WebService
{
[WebMethod]
public int Add(int a, int b)
{
return a + b;
}
}
<%@ 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
Applies to
Samarbeta med oss på GitHub
Källan för det här innehållet finns på GitHub, där du även kan skapa och granska ärenden och pull-begäranden. Se vår deltagarguide för mer information.