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
Colaborați cu noi pe GitHub
Sursa pentru acest conținut poate fi găsită pe GitHub, unde puteți, de asemenea, să creați și să consultați probleme și solicitări de tragere. Pentru mai multe informații, consultați ghidul nostru pentru colaboratori.