WebServiceAttribute コンストラクタ
アセンブリ: System.Web.Services (system.web.services.dll 内)
構文
使用例
<%@ WebService Language="VB" class= "ServerVariables"%> Imports System Imports System.Web.Services Imports System.Web.Services.Protocols <WebService(Namespace := "http://www.contoso.com/")> _ Public Class ServerVariables Inherits WebService <WebMethod(Description := "Returns the time as stored on the Server", _ EnableSession := False)> _ Public Function Time() As String Return Context.Timestamp.TimeOfDay.ToString() End Function End Class
<%@ WebService Language="C#" class= "ServerVariables"%> using System; using System.Web.Services; using System.Web.Services.Protocols; [ WebService(Namespace="http://www.contoso.com/")] public class ServerVariables: WebService { [ WebMethod(Description="Returns the time as stored on the Server" ,EnableSession=false)] public string Time() { return Context.Timestamp.TimeOfDay.ToString(); } }
Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。
参照
- WebServiceAttribute コンストラクタのページへのリンク